aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-01-12 19:12:52 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-01-12 19:12:52 +0000
commit2033b4b97d6b5205608dd5313a4c352b17036544 (patch)
tree36c6b42d44f318934773c7b012e03e19664ed415 /gas
parentdb5f402d40beac21d890e4b0b8ec85c17ec4c562 (diff)
downloadgdb-2033b4b97d6b5205608dd5313a4c352b17036544.zip
gdb-2033b4b97d6b5205608dd5313a4c352b17036544.tar.gz
gdb-2033b4b97d6b5205608dd5313a4c352b17036544.tar.bz2
gas/testsuite/
2005-01-12 H.J. Lu <hongjiu.lu@intel.com> * i386/i386.exp: Run "sib". * gas/i386/sib.d: New file. * gas/i386/sib.s: Likewise. opcodes/ 2005-01-12 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (OP_E): Ignore scale when index == 0x4 in SIB.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/sib.d15
-rw-r--r--gas/testsuite/gas/i386/sib.s11
4 files changed, 34 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 24c5cc8..ed357fb 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386/i386.exp: Run "sib".
+
+ * gas/i386/sib.d: New file.
+ * gas/i386/sib.s: Likewise.
+
2005-01-09 Andreas Schwab <schwab@suse.de>
* gas/i386/intel16.d: Ignore trailing text with #pass.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 1846268..98b6ea6 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -57,6 +57,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "sse2"
run_dump_test "sub"
run_dump_test "prescott"
+ run_dump_test "sib"
if {![istarget "*-*-aix*"]
&& (![is_elf_format] || [istarget "*-*-linux*"]
diff --git a/gas/testsuite/gas/i386/sib.d b/gas/testsuite/gas/i386/sib.d
new file mode 100644
index 0000000..2a5dbb6
--- /dev/null
+++ b/gas/testsuite/gas/i386/sib.d
@@ -0,0 +1,15 @@
+#objdump: -dw
+#name: i386 SIB
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+000 <foo>:
+ 0: 8b 04 23 [ ]*mov [ ]*\(%ebx\),%eax
+ 3: 8b 04 63 [ ]*mov [ ]*\(%ebx\),%eax
+ 6: 8b 04 a3 [ ]*mov [ ]*\(%ebx\),%eax
+ 9: 8b 04 e3 [ ]*mov [ ]*\(%ebx\),%eax
+ c: 90 [ ]*nop [ ]*
+ d: 90 [ ]*nop [ ]*
+ ...
diff --git a/gas/testsuite/gas/i386/sib.s b/gas/testsuite/gas/i386/sib.s
new file mode 100644
index 0000000..25d88b7
--- /dev/null
+++ b/gas/testsuite/gas/i386/sib.s
@@ -0,0 +1,11 @@
+#Test the special case of the index bits, 0x4, in SIB.
+
+ .text
+foo:
+ .byte 0x8B, 0x04, 0x23 # effect is: movl (%ebx), %eax
+ .byte 0x8B, 0x04, 0x63 # effect is: movl (%ebx), %eax
+ .byte 0x8B, 0x04, 0xA3 # effect is: movl (%ebx), %eax
+ .byte 0x8B, 0x04, 0xE3 # effect is: movl (%ebx), %eax
+ nop
+ nop
+ .p2align 4,0