aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-12-01 14:56:11 +0000
committerJan Beulich <jbeulich@novell.com>2006-12-01 14:56:11 +0000
commita35ca55aee929c1b59136d93a257f0b5dcad6186 (patch)
treedd0bd11d8ea33554952ee0f83acb2c5d67f6ff8a /gas/testsuite
parent55d55ac712a8d2763cce40bafdb31ca3c2f04beb (diff)
downloadgdb-a35ca55aee929c1b59136d93a257f0b5dcad6186.zip
gdb-a35ca55aee929c1b59136d93a257f0b5dcad6186.tar.gz
gdb-a35ca55aee929c1b59136d93a257f0b5dcad6186.tar.bz2
opcodes/
2006-11-30 Jan Beulich <jbeulich@novell.com> * i386-dis.c (dis386): Use 'R' and 'O' for cbw/cwd unconditionally. (putop): For 'O' suffix, print 'q' in Intel mode, and mark data prefix used. For 'R' and 'W' suffix, simplify and fix Intel mode. gas/testsuite/ 2006-11-30 Jan Beulich <jbeulich@novell.com> * gas/i386/intel.s: Use Intel syntax in Intel syntax test. * gas/i386/x86-64-cbw.[sd]: New. * gas/i386/x86-64-cbw-intel.d: New. * gas/i386/i386.exp: Run new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/intel.s4
-rw-r--r--gas/testsuite/gas/i386/x86-64-cbw-intel.d26
-rw-r--r--gas/testsuite/gas/i386/x86-64-cbw.d25
-rw-r--r--gas/testsuite/gas/i386/x86-64-cbw.s18
6 files changed, 80 insertions, 2 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index ef83e7f..725f910 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2006-11-30 Jan Beulich <jbeulich@novell.com>
+
+ * gas/i386/intel.s: Use Intel syntax in Intel syntax test.
+ * gas/i386/x86-64-cbw.[sd]: New.
+ * gas/i386/x86-64-cbw-intel.d: New.
+ * gas/i386/i386.exp: Run new tests.
+
2006-11-29 Paul Brook <paul@codesourcery.com>
* gas/arm/vfpv3-const-conv.s: Improve test coverage.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index cead592..699ad65 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -155,6 +155,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-merom"
run_dump_test "x86-64-rep"
run_dump_test "x86-64-rep-suffix"
+ run_dump_test "x86-64-cbw"
+ run_dump_test "x86-64-cbw-intel"
run_dump_test "x86-64-gidt"
run_dump_test "x86-64-nops"
if ![istarget "*-*-mingw64*"] then {
diff --git a/gas/testsuite/gas/i386/intel.s b/gas/testsuite/gas/i386/intel.s
index 464f4b6..e0eedc9 100644
--- a/gas/testsuite/gas/i386/intel.s
+++ b/gas/testsuite/gas/i386/intel.s
@@ -484,8 +484,8 @@ foo:
xchg bp, ax
xchg si, ax
xchg di, ax
- cbtw
- cwtd
+ cbw
+ cwd
callw 0x9090,0x9090
pushfw
popfw
diff --git a/gas/testsuite/gas/i386/x86-64-cbw-intel.d b/gas/testsuite/gas/i386/x86-64-cbw-intel.d
new file mode 100644
index 0000000..616ffad
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cbw-intel.d
@@ -0,0 +1,26 @@
+#source: x86-64-cbw.s
+#objdump: -dwMintel
+#name: x86-64 CBW/CWD & Co (Intel disassembly)
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+000 <_cbw>:
+ 0: 66 98 cbw
+ 2: 98 cwde
+ 3: 48 98 cdqe
+ 5: 66 40 98 rex cbw
+ 8: 40 98 rex cwde
+ a: 66 data16
+ b: 48 98 cdqe
+
+0+00d <_cwd>:
+ d: 66 99 cwd
+ f: 99 cdq
+ 10: 48 99 cqo
+ 12: 66 40 99 rex cwd
+ 15: 40 99 rex cdq
+ 17: 66 data16
+ 18: 48 99 cqo
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-cbw.d b/gas/testsuite/gas/i386/x86-64-cbw.d
new file mode 100644
index 0000000..5474ce2
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cbw.d
@@ -0,0 +1,25 @@
+#objdump: -dw
+#name: x86-64 CBW/CWD & Co
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+000 <_cbw>:
+ 0: 66 98 cbtw
+ 2: 98 cwtl
+ 3: 48 98 cltq
+ 5: 66 40 98 rex cbtw
+ 8: 40 98 rex cwtl
+ a: 66 data16
+ b: 48 98 cltq
+
+0+00d <_cwd>:
+ d: 66 99 cwtd
+ f: 99 cltd
+ 10: 48 99 cqto
+ 12: 66 40 99 rex cwtd
+ 15: 40 99 rex cltd
+ 17: 66 data16
+ 18: 48 99 cqto
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-cbw.s b/gas/testsuite/gas/i386/x86-64-cbw.s
new file mode 100644
index 0000000..085c279
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cbw.s
@@ -0,0 +1,18 @@
+ .intel_syntax noprefix
+ .text
+_cbw:
+ cbw
+ cwde
+ cdqe
+ rex cbw
+ rex cwde
+ rex64 cbw
+_cwd:
+ cwd
+ cdq
+ cqo
+ rex cwd
+ rex cdq
+ rex64 cwd
+
+ .p2align 4,0