diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-09-20 17:38:38 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-09-20 17:38:38 +0000 |
commit | db51cc60e255cb54b8960598beb1350b056a23e7 (patch) | |
tree | 199d3fda202f00e0d7dfbcd3b4c8deba4495f9b7 /gas/testsuite | |
parent | 97ab0fdd9d053ee9201c74d4234fb68c74916548 (diff) | |
download | gdb-db51cc60e255cb54b8960598beb1350b056a23e7.zip gdb-db51cc60e255cb54b8960598beb1350b056a23e7.tar.gz gdb-db51cc60e255cb54b8960598beb1350b056a23e7.tar.bz2 |
gas/
2007-09-20 H.J. Lu <hongjiu.lu@intel.com>
PR 658
* config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Removed.
(set_allow_index_reg): New.
(allow_index_reg): Likewise.
(md_pseudo_table): Add "allow_index_reg" and
"disallow_index_reg".
(build_modrm_byte): Set i.sib.index to NO_INDEX_REGISTER for
fake index registers.
(i386_scale): Updated.
(i386_index_check): Support fake index registers.
(parse_real_register): Return NULL on eiz/riz if fake index
registers aren't allowed.
gas/testsuite/
2007-09-20 H.J. Lu <hongjiu.lu@intel.com>
PR 658
* gas/i386/i386.exp: Run sib-intel, x86-64-sib and
x86-64-sib-intel.
* gas/i386/nops-1-i386-i686.d: Updated.
* gas/i386/nops-1-i386.d: Likewise.
* gas/i386/nops-1.d: Likewise.
* gas/i386/nops-2-i386.d: Likewise.
* gas/i386/nops-2-merom.d: Likewise.
* gas/i386/nops-2.d: Likewise.
* gas/i386/nops-3-i386.d: Likewise.
* gas/i386/nops-3.d : Likewise.
* gas/i386/sib.d: Likewise.
* gas/i386/sib.s: Use %eiz in testcases.
* gas/i386/sib-intel.d: New.
* gas/i386/x86-64-sib-intel.d: Likewise.
* gas/i386/x86-64-sib.d: Likewise.
* gas/i386/x86-64-sib.s: Likewise.
ld/testsuite/
2007-09-20 H.J. Lu <hongjiu.lu@intel.com>
PR 658
* ld-i386/tlsbin.dd: Updated.
* ld-i386/tlsld1.dd: Likewise.
opcodes/
2007-09-20 H.J. Lu <hongjiu.lu@intel.com>
PR 658
* 386-dis.c (index64): New.
(index32): Likewise.
(intel_index64): Likewise.
(intel_index32): Likewise.
(att_index64): Likewise.
(att_index32): Likewise.
(print_insn): Set index64 and index32.
(OP_E_extended): Use index64/index32 for index register for
SIB with INDEX == 4.
* i386-opc.h (RegEiz): New.
(RegRiz): Likewise.
* i386-reg.tbl: Add eiz and riz.
* i386-tbl.h: Regenerated.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 23 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-1-i386-i686.d | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-1-i386.d | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-1.d | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-2-i386.d | 24 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-2-merom.d | 24 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-2.d | 24 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-3-i386.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/nops-3.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/sib-intel.d | 20 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/sib.d | 20 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/sib.s | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-sib-intel.d | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-sib.d | 20 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-sib.s | 16 |
16 files changed, 200 insertions, 88 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2995298..279a5d8 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,26 @@ +2007-09-20 H.J. Lu <hongjiu.lu@intel.com> + + PR 658 + * gas/i386/i386.exp: Run sib-intel, x86-64-sib and + x86-64-sib-intel. + + * gas/i386/nops-1-i386-i686.d: Updated. + * gas/i386/nops-1-i386.d: Likewise. + * gas/i386/nops-1.d: Likewise. + * gas/i386/nops-2-i386.d: Likewise. + * gas/i386/nops-2-merom.d: Likewise. + * gas/i386/nops-2.d: Likewise. + * gas/i386/nops-3-i386.d: Likewise. + * gas/i386/nops-3.d : Likewise. + * gas/i386/sib.d: Likewise. + + * gas/i386/sib.s: Use %eiz in testcases. + + * gas/i386/sib-intel.d: New. + * gas/i386/x86-64-sib-intel.d: Likewise. + * gas/i386/x86-64-sib.d: Likewise. + * gas/i386/x86-64-sib.s: Likewise. + 2007-09-19 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/intelok.s: Add tests for memory without base. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 38bed74..9807432 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -46,6 +46,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "sub" run_dump_test "prescott" run_dump_test "sib" + run_dump_test "sib-intel" run_dump_test "vmx" run_dump_test "suffix" run_dump_test "immed32" @@ -196,6 +197,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-mem-intel" run_dump_test "x86-64-reg" run_dump_test "x86-64-reg-intel" + run_dump_test "x86-64-sib" + run_dump_test "x86-64-sib-intel" if { ![istarget "*-*-aix*"] && ![istarget "*-*-beos*"] diff --git a/gas/testsuite/gas/i386/nops-1-i386-i686.d b/gas/testsuite/gas/i386/nops-1-i386-i686.d index 0112662..7b0cd47 100644 --- a/gas/testsuite/gas/i386/nops-1-i386-i686.d +++ b/gas/testsuite/gas/i386/nops-1-i386-i686.d @@ -27,15 +27,15 @@ Disassembly of section .text: 0+10 <nop14>: [ ]*10:[ ]+90[ ]+nop[ ]* [ ]*11:[ ]+90[ ]+nop[ ]* -[ ]*12:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*19:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*12:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*19:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+20 <nop13>: [ ]*20:[ ]+90[ ]+nop[ ]* [ ]*21:[ ]+90[ ]+nop[ ]* [ ]*22:[ ]+90[ ]+nop[ ]* [ ]*23:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+30 <nop12>: [ ]*30:[ ]+90[ ]+nop[ ]* @@ -51,8 +51,8 @@ Disassembly of section .text: [ ]*42:[ ]+90[ ]+nop[ ]* [ ]*43:[ ]+90[ ]+nop[ ]* [ ]*44:[ ]+90[ ]+nop[ ]* -[ ]*45:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*49:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*45:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*49:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+50 <nop10>: [ ]*50:[ ]+90[ ]+nop[ ]* @@ -62,7 +62,7 @@ Disassembly of section .text: [ ]*54:[ ]+90[ ]+nop[ ]* [ ]*55:[ ]+90[ ]+nop[ ]* [ ]*56:[ ]+8d 76 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+60 <nop9>: [ ]*60:[ ]+90[ ]+nop[ ]* @@ -73,7 +73,7 @@ Disassembly of section .text: [ ]*65:[ ]+90[ ]+nop[ ]* [ ]*66:[ ]+90[ ]+nop[ ]* [ ]*67:[ ]+89 f6[ ]+mov[ ]+%esi,%esi -[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+70 <nop8>: [ ]*70:[ ]+90[ ]+nop[ ]* @@ -85,7 +85,7 @@ Disassembly of section .text: [ ]*76:[ ]+90[ ]+nop[ ]* [ ]*77:[ ]+90[ ]+nop[ ]* [ ]*78:[ ]+90[ ]+nop[ ]* -[ ]*79:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*79:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+80 <nop7>: [ ]*80:[ ]+90[ ]+nop[ ]* @@ -97,7 +97,7 @@ Disassembly of section .text: [ ]*86:[ ]+90[ ]+nop[ ]* [ ]*87:[ ]+90[ ]+nop[ ]* [ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+90 <nop6>: [ ]*90:[ ]+90[ ]+nop[ ]* @@ -125,7 +125,7 @@ Disassembly of section .text: [ ]*a9:[ ]+90[ ]+nop[ ]* [ ]*aa:[ ]+90[ ]+nop[ ]* [ ]*ab:[ ]+90[ ]+nop[ ]* -[ ]*ac:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*ac:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+b0 <nop4>: [ ]*b0:[ ]+90[ ]+nop[ ]* @@ -140,7 +140,7 @@ Disassembly of section .text: [ ]*b9:[ ]+90[ ]+nop[ ]* [ ]*ba:[ ]+90[ ]+nop[ ]* [ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+c0 <nop3>: [ ]*c0:[ ]+90[ ]+nop[ ]* diff --git a/gas/testsuite/gas/i386/nops-1-i386.d b/gas/testsuite/gas/i386/nops-1-i386.d index a3432f0..f9e1541 100644 --- a/gas/testsuite/gas/i386/nops-1-i386.d +++ b/gas/testsuite/gas/i386/nops-1-i386.d @@ -27,15 +27,15 @@ Disassembly of section .text: 0+10 <nop14>: [ ]*10:[ ]+90[ ]+nop[ ]* [ ]*11:[ ]+90[ ]+nop[ ]* -[ ]*12:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*19:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*12:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*19:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+20 <nop13>: [ ]*20:[ ]+90[ ]+nop[ ]* [ ]*21:[ ]+90[ ]+nop[ ]* [ ]*22:[ ]+90[ ]+nop[ ]* [ ]*23:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+30 <nop12>: [ ]*30:[ ]+90[ ]+nop[ ]* @@ -51,8 +51,8 @@ Disassembly of section .text: [ ]*42:[ ]+90[ ]+nop[ ]* [ ]*43:[ ]+90[ ]+nop[ ]* [ ]*44:[ ]+90[ ]+nop[ ]* -[ ]*45:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*49:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*45:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*49:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+50 <nop10>: [ ]*50:[ ]+90[ ]+nop[ ]* @@ -62,7 +62,7 @@ Disassembly of section .text: [ ]*54:[ ]+90[ ]+nop[ ]* [ ]*55:[ ]+90[ ]+nop[ ]* [ ]*56:[ ]+8d 76 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+60 <nop9>: [ ]*60:[ ]+90[ ]+nop[ ]* @@ -73,7 +73,7 @@ Disassembly of section .text: [ ]*65:[ ]+90[ ]+nop[ ]* [ ]*66:[ ]+90[ ]+nop[ ]* [ ]*67:[ ]+89 f6[ ]+mov[ ]+%esi,%esi -[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+70 <nop8>: [ ]*70:[ ]+90[ ]+nop[ ]* @@ -85,7 +85,7 @@ Disassembly of section .text: [ ]*76:[ ]+90[ ]+nop[ ]* [ ]*77:[ ]+90[ ]+nop[ ]* [ ]*78:[ ]+90[ ]+nop[ ]* -[ ]*79:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*79:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+80 <nop7>: [ ]*80:[ ]+90[ ]+nop[ ]* @@ -97,7 +97,7 @@ Disassembly of section .text: [ ]*86:[ ]+90[ ]+nop[ ]* [ ]*87:[ ]+90[ ]+nop[ ]* [ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+90 <nop6>: [ ]*90:[ ]+90[ ]+nop[ ]* @@ -125,7 +125,7 @@ Disassembly of section .text: [ ]*a9:[ ]+90[ ]+nop[ ]* [ ]*aa:[ ]+90[ ]+nop[ ]* [ ]*ab:[ ]+90[ ]+nop[ ]* -[ ]*ac:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*ac:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+b0 <nop4>: [ ]*b0:[ ]+90[ ]+nop[ ]* @@ -140,7 +140,7 @@ Disassembly of section .text: [ ]*b9:[ ]+90[ ]+nop[ ]* [ ]*ba:[ ]+90[ ]+nop[ ]* [ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+c0 <nop3>: [ ]*c0:[ ]+90[ ]+nop[ ]* diff --git a/gas/testsuite/gas/i386/nops-1.d b/gas/testsuite/gas/i386/nops-1.d index 4e81e95..010f490 100644 --- a/gas/testsuite/gas/i386/nops-1.d +++ b/gas/testsuite/gas/i386/nops-1.d @@ -26,15 +26,15 @@ Disassembly of section .text: 0+10 <nop14>: [ ]*10:[ ]+90[ ]+nop[ ]* [ ]*11:[ ]+90[ ]+nop[ ]* -[ ]*12:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*19:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*12:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*19:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+20 <nop13>: [ ]*20:[ ]+90[ ]+nop[ ]* [ ]*21:[ ]+90[ ]+nop[ ]* [ ]*22:[ ]+90[ ]+nop[ ]* [ ]*23:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+30 <nop12>: [ ]*30:[ ]+90[ ]+nop[ ]* @@ -50,8 +50,8 @@ Disassembly of section .text: [ ]*42:[ ]+90[ ]+nop[ ]* [ ]*43:[ ]+90[ ]+nop[ ]* [ ]*44:[ ]+90[ ]+nop[ ]* -[ ]*45:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*49:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*45:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*49:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+50 <nop10>: [ ]*50:[ ]+90[ ]+nop[ ]* @@ -61,7 +61,7 @@ Disassembly of section .text: [ ]*54:[ ]+90[ ]+nop[ ]* [ ]*55:[ ]+90[ ]+nop[ ]* [ ]*56:[ ]+8d 76 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+60 <nop9>: [ ]*60:[ ]+90[ ]+nop[ ]* @@ -72,7 +72,7 @@ Disassembly of section .text: [ ]*65:[ ]+90[ ]+nop[ ]* [ ]*66:[ ]+90[ ]+nop[ ]* [ ]*67:[ ]+89 f6[ ]+mov[ ]+%esi,%esi -[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+70 <nop8>: [ ]*70:[ ]+90[ ]+nop[ ]* @@ -84,7 +84,7 @@ Disassembly of section .text: [ ]*76:[ ]+90[ ]+nop[ ]* [ ]*77:[ ]+90[ ]+nop[ ]* [ ]*78:[ ]+90[ ]+nop[ ]* -[ ]*79:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*79:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+80 <nop7>: [ ]*80:[ ]+90[ ]+nop[ ]* @@ -96,7 +96,7 @@ Disassembly of section .text: [ ]*86:[ ]+90[ ]+nop[ ]* [ ]*87:[ ]+90[ ]+nop[ ]* [ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+90 <nop6>: [ ]*90:[ ]+90[ ]+nop[ ]* @@ -124,7 +124,7 @@ Disassembly of section .text: [ ]*a9:[ ]+90[ ]+nop[ ]* [ ]*aa:[ ]+90[ ]+nop[ ]* [ ]*ab:[ ]+90[ ]+nop[ ]* -[ ]*ac:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*ac:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+b0 <nop4>: [ ]*b0:[ ]+90[ ]+nop[ ]* @@ -139,7 +139,7 @@ Disassembly of section .text: [ ]*b9:[ ]+90[ ]+nop[ ]* [ ]*ba:[ ]+90[ ]+nop[ ]* [ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+c0 <nop3>: [ ]*c0:[ ]+90[ ]+nop[ ]* diff --git a/gas/testsuite/gas/i386/nops-2-i386.d b/gas/testsuite/gas/i386/nops-2-i386.d index d910653..57f8dda 100644 --- a/gas/testsuite/gas/i386/nops-2-i386.d +++ b/gas/testsuite/gas/i386/nops-2-i386.d @@ -10,7 +10,7 @@ Disassembly of section .text: 0+ <nop>: [ ]*0:[ ]+0f 44 c0[ ]+cmove[ ]+%eax,%eax [ ]*3:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*9:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*9:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+10 <nop15>: [ ]*10:[ ]+90[ ]+nop[ ]* @@ -32,15 +32,15 @@ Disassembly of section .text: 0+20 <nop14>: [ ]*20:[ ]+90[ ]+nop[ ]* [ ]*21:[ ]+90[ ]+nop[ ]* -[ ]*22:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*22:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+30 <nop13>: [ ]*30:[ ]+90[ ]+nop[ ]* [ ]*31:[ ]+90[ ]+nop[ ]* [ ]*32:[ ]+90[ ]+nop[ ]* [ ]*33:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*39:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*39:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+40 <nop12>: [ ]*40:[ ]+90[ ]+nop[ ]* @@ -56,8 +56,8 @@ Disassembly of section .text: [ ]*52:[ ]+90[ ]+nop[ ]* [ ]*53:[ ]+90[ ]+nop[ ]* [ ]*54:[ ]+90[ ]+nop[ ]* -[ ]*55:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*55:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+60 <nop10>: [ ]*60:[ ]+90[ ]+nop[ ]* @@ -67,7 +67,7 @@ Disassembly of section .text: [ ]*64:[ ]+90[ ]+nop[ ]* [ ]*65:[ ]+90[ ]+nop[ ]* [ ]*66:[ ]+8d 76 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+70 <nop9>: [ ]*70:[ ]+90[ ]+nop[ ]* @@ -78,7 +78,7 @@ Disassembly of section .text: [ ]*75:[ ]+90[ ]+nop[ ]* [ ]*76:[ ]+90[ ]+nop[ ]* [ ]*77:[ ]+89 f6[ ]+mov[ ]+%esi,%esi -[ ]*79:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*79:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+80 <nop8>: [ ]*80:[ ]+90[ ]+nop[ ]* @@ -90,7 +90,7 @@ Disassembly of section .text: [ ]*86:[ ]+90[ ]+nop[ ]* [ ]*87:[ ]+90[ ]+nop[ ]* [ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+90 <nop7>: [ ]*90:[ ]+90[ ]+nop[ ]* @@ -102,7 +102,7 @@ Disassembly of section .text: [ ]*96:[ ]+90[ ]+nop[ ]* [ ]*97:[ ]+90[ ]+nop[ ]* [ ]*98:[ ]+90[ ]+nop[ ]* -[ ]*99:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*99:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+a0 <nop6>: [ ]*a0:[ ]+90[ ]+nop[ ]* @@ -130,7 +130,7 @@ Disassembly of section .text: [ ]*b9:[ ]+90[ ]+nop[ ]* [ ]*ba:[ ]+90[ ]+nop[ ]* [ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+c0 <nop4>: [ ]*c0:[ ]+90[ ]+nop[ ]* @@ -145,7 +145,7 @@ Disassembly of section .text: [ ]*c9:[ ]+90[ ]+nop[ ]* [ ]*ca:[ ]+90[ ]+nop[ ]* [ ]*cb:[ ]+90[ ]+nop[ ]* -[ ]*cc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*cc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+d0 <nop3>: [ ]*d0:[ ]+90[ ]+nop[ ]* diff --git a/gas/testsuite/gas/i386/nops-2-merom.d b/gas/testsuite/gas/i386/nops-2-merom.d index c6ea559..7a54411 100644 --- a/gas/testsuite/gas/i386/nops-2-merom.d +++ b/gas/testsuite/gas/i386/nops-2-merom.d @@ -10,7 +10,7 @@ Disassembly of section .text: 0+ <nop>: [ ]*0:[ ]+0f 44 c0[ ]+cmove[ ]+%eax,%eax [ ]*3:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*9:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*9:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+10 <nop15>: [ ]*10:[ ]+90[ ]+nop[ ]* @@ -32,15 +32,15 @@ Disassembly of section .text: 0+20 <nop14>: [ ]*20:[ ]+90[ ]+nop[ ]* [ ]*21:[ ]+90[ ]+nop[ ]* -[ ]*22:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*22:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+30 <nop13>: [ ]*30:[ ]+90[ ]+nop[ ]* [ ]*31:[ ]+90[ ]+nop[ ]* [ ]*32:[ ]+90[ ]+nop[ ]* [ ]*33:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*39:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*39:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+40 <nop12>: [ ]*40:[ ]+90[ ]+nop[ ]* @@ -56,8 +56,8 @@ Disassembly of section .text: [ ]*52:[ ]+90[ ]+nop[ ]* [ ]*53:[ ]+90[ ]+nop[ ]* [ ]*54:[ ]+90[ ]+nop[ ]* -[ ]*55:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*55:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+60 <nop10>: [ ]*60:[ ]+90[ ]+nop[ ]* @@ -67,7 +67,7 @@ Disassembly of section .text: [ ]*64:[ ]+90[ ]+nop[ ]* [ ]*65:[ ]+90[ ]+nop[ ]* [ ]*66:[ ]+8d 76 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+70 <nop9>: [ ]*70:[ ]+90[ ]+nop[ ]* @@ -78,7 +78,7 @@ Disassembly of section .text: [ ]*75:[ ]+90[ ]+nop[ ]* [ ]*76:[ ]+90[ ]+nop[ ]* [ ]*77:[ ]+89 f6[ ]+mov[ ]+%esi,%esi -[ ]*79:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*79:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+80 <nop8>: [ ]*80:[ ]+90[ ]+nop[ ]* @@ -90,7 +90,7 @@ Disassembly of section .text: [ ]*86:[ ]+90[ ]+nop[ ]* [ ]*87:[ ]+90[ ]+nop[ ]* [ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+90 <nop7>: [ ]*90:[ ]+90[ ]+nop[ ]* @@ -102,7 +102,7 @@ Disassembly of section .text: [ ]*96:[ ]+90[ ]+nop[ ]* [ ]*97:[ ]+90[ ]+nop[ ]* [ ]*98:[ ]+90[ ]+nop[ ]* -[ ]*99:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*99:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+a0 <nop6>: [ ]*a0:[ ]+90[ ]+nop[ ]* @@ -130,7 +130,7 @@ Disassembly of section .text: [ ]*b9:[ ]+90[ ]+nop[ ]* [ ]*ba:[ ]+90[ ]+nop[ ]* [ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+c0 <nop4>: [ ]*c0:[ ]+90[ ]+nop[ ]* @@ -145,7 +145,7 @@ Disassembly of section .text: [ ]*c9:[ ]+90[ ]+nop[ ]* [ ]*ca:[ ]+90[ ]+nop[ ]* [ ]*cb:[ ]+90[ ]+nop[ ]* -[ ]*cc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*cc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+d0 <nop3>: [ ]*d0:[ ]+90[ ]+nop[ ]* diff --git a/gas/testsuite/gas/i386/nops-2.d b/gas/testsuite/gas/i386/nops-2.d index 6382f7e..003a4eb 100644 --- a/gas/testsuite/gas/i386/nops-2.d +++ b/gas/testsuite/gas/i386/nops-2.d @@ -9,7 +9,7 @@ Disassembly of section .text: 0+ <nop>: [ ]*0:[ ]+0f 44 c0[ ]+cmove[ ]+%eax,%eax [ ]*3:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*9:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*9:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+10 <nop15>: [ ]*10:[ ]+90[ ]+nop[ ]* @@ -31,15 +31,15 @@ Disassembly of section .text: 0+20 <nop14>: [ ]*20:[ ]+90[ ]+nop[ ]* [ ]*21:[ ]+90[ ]+nop[ ]* -[ ]*22:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*22:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*29:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+30 <nop13>: [ ]*30:[ ]+90[ ]+nop[ ]* [ ]*31:[ ]+90[ ]+nop[ ]* [ ]*32:[ ]+90[ ]+nop[ ]* [ ]*33:[ ]+8d b6 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*39:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*39:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+40 <nop12>: [ ]*40:[ ]+90[ ]+nop[ ]* @@ -55,8 +55,8 @@ Disassembly of section .text: [ ]*52:[ ]+90[ ]+nop[ ]* [ ]*53:[ ]+90[ ]+nop[ ]* [ ]*54:[ ]+90[ ]+nop[ ]* -[ ]*55:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*55:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi +[ ]*59:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+60 <nop10>: [ ]*60:[ ]+90[ ]+nop[ ]* @@ -66,7 +66,7 @@ Disassembly of section .text: [ ]*64:[ ]+90[ ]+nop[ ]* [ ]*65:[ ]+90[ ]+nop[ ]* [ ]*66:[ ]+8d 76 00[ ]+lea[ ]+0x0\(%esi\),%esi -[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*69:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+70 <nop9>: [ ]*70:[ ]+90[ ]+nop[ ]* @@ -77,7 +77,7 @@ Disassembly of section .text: [ ]*75:[ ]+90[ ]+nop[ ]* [ ]*76:[ ]+90[ ]+nop[ ]* [ ]*77:[ ]+89 f6[ ]+mov[ ]+%esi,%esi -[ ]*79:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi\),%edi +[ ]*79:[ ]+8d bc 27 00 00 00 00[ ]+lea[ ]+0x0\(%edi,%eiz,1\),%edi 0+80 <nop8>: [ ]*80:[ ]+90[ ]+nop[ ]* @@ -89,7 +89,7 @@ Disassembly of section .text: [ ]*86:[ ]+90[ ]+nop[ ]* [ ]*87:[ ]+90[ ]+nop[ ]* [ ]*88:[ ]+90[ ]+nop[ ]* -[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*89:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+90 <nop7>: [ ]*90:[ ]+90[ ]+nop[ ]* @@ -101,7 +101,7 @@ Disassembly of section .text: [ ]*96:[ ]+90[ ]+nop[ ]* [ ]*97:[ ]+90[ ]+nop[ ]* [ ]*98:[ ]+90[ ]+nop[ ]* -[ ]*99:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*99:[ ]+8d b4 26 00 00 00 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+a0 <nop6>: [ ]*a0:[ ]+90[ ]+nop[ ]* @@ -129,7 +129,7 @@ Disassembly of section .text: [ ]*b9:[ ]+90[ ]+nop[ ]* [ ]*ba:[ ]+90[ ]+nop[ ]* [ ]*bb:[ ]+90[ ]+nop[ ]* -[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*bc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+c0 <nop4>: [ ]*c0:[ ]+90[ ]+nop[ ]* @@ -144,7 +144,7 @@ Disassembly of section .text: [ ]*c9:[ ]+90[ ]+nop[ ]* [ ]*ca:[ ]+90[ ]+nop[ ]* [ ]*cb:[ ]+90[ ]+nop[ ]* -[ ]*cc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi\),%esi +[ ]*cc:[ ]+8d 74 26 00[ ]+lea[ ]+0x0\(%esi,%eiz,1\),%esi 0+d0 <nop3>: [ ]*d0:[ ]+90[ ]+nop[ ]* diff --git a/gas/testsuite/gas/i386/nops-3-i386.d b/gas/testsuite/gas/i386/nops-3-i386.d index 4184362..6ab3fab 100644 --- a/gas/testsuite/gas/i386/nops-3-i386.d +++ b/gas/testsuite/gas/i386/nops-3-i386.d @@ -40,6 +40,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx -[ ]*[a-f0-9]+: 8d b4 26 00 00 00 00 lea 0x0\(%esi\),%esi -[ ]*[a-f0-9]+: 8d bc 27 00 00 00 00 lea 0x0\(%edi\),%edi +[ ]*[a-f0-9]+: 8d b4 26 00 00 00 00 lea 0x0\(%esi,%eiz,1\),%esi +[ ]*[a-f0-9]+: 8d bc 27 00 00 00 00 lea 0x0\(%edi,%eiz,1\),%edi #pass diff --git a/gas/testsuite/gas/i386/nops-3.d b/gas/testsuite/gas/i386/nops-3.d index 1764069..77ce744 100644 --- a/gas/testsuite/gas/i386/nops-3.d +++ b/gas/testsuite/gas/i386/nops-3.d @@ -39,6 +39,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx -[ ]*[a-f0-9]+: 8d b4 26 00 00 00 00 lea 0x0\(%esi\),%esi -[ ]*[a-f0-9]+: 8d bc 27 00 00 00 00 lea 0x0\(%edi\),%edi +[ ]*[a-f0-9]+: 8d b4 26 00 00 00 00 lea 0x0\(%esi,%eiz,1\),%esi +[ ]*[a-f0-9]+: 8d bc 27 00 00 00 00 lea 0x0\(%edi,%eiz,1\),%edi #pass diff --git a/gas/testsuite/gas/i386/sib-intel.d b/gas/testsuite/gas/i386/sib-intel.d new file mode 100644 index 0000000..707f74a --- /dev/null +++ b/gas/testsuite/gas/i386/sib-intel.d @@ -0,0 +1,20 @@ +#source: sib.s +#objdump: -dw -Mintel +#name: i386 SIB (Intel mode) + +.*: +file format .* + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 8b 03 mov eax,DWORD PTR \[ebx\] +[ ]*[a-f0-9]+: 8b 04 23 mov eax,DWORD PTR \[ebx\+eiz\*1\] +[ ]*[a-f0-9]+: 8b 04 63 mov eax,DWORD PTR \[ebx\+eiz\*2\] +[ ]*[a-f0-9]+: 8b 04 a3 mov eax,DWORD PTR \[ebx\+eiz\*4\] +[ ]*[a-f0-9]+: 8b 04 e3 mov eax,DWORD PTR \[ebx\+eiz\*8\] +[ ]*[a-f0-9]+: 8b 04 24 mov eax,DWORD PTR \[esp\] +[ ]*[a-f0-9]+: 8b 04 24 mov eax,DWORD PTR \[esp\] +[ ]*[a-f0-9]+: 8b 04 64 mov eax,DWORD PTR \[esp\+eiz\*2\] +[ ]*[a-f0-9]+: 8b 04 a4 mov eax,DWORD PTR \[esp\+eiz\*4\] +[ ]*[a-f0-9]+: 8b 04 e4 mov eax,DWORD PTR \[esp\+eiz\*8\] +#pass diff --git a/gas/testsuite/gas/i386/sib.d b/gas/testsuite/gas/i386/sib.d index 2a5dbb6..574a308 100644 --- a/gas/testsuite/gas/i386/sib.d +++ b/gas/testsuite/gas/i386/sib.d @@ -5,11 +5,15 @@ 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 [ ]* - ... +0+ <foo>: +[ ]*[a-f0-9]+: 8b 03 mov \(%ebx\),%eax +[ ]*[a-f0-9]+: 8b 04 23 mov \(%ebx,%eiz,1\),%eax +[ ]*[a-f0-9]+: 8b 04 63 mov \(%ebx,%eiz,2\),%eax +[ ]*[a-f0-9]+: 8b 04 a3 mov \(%ebx,%eiz,4\),%eax +[ ]*[a-f0-9]+: 8b 04 e3 mov \(%ebx,%eiz,8\),%eax +[ ]*[a-f0-9]+: 8b 04 24 mov \(%esp\),%eax +[ ]*[a-f0-9]+: 8b 04 24 mov \(%esp\),%eax +[ ]*[a-f0-9]+: 8b 04 64 mov \(%esp,%eiz,2\),%eax +[ ]*[a-f0-9]+: 8b 04 a4 mov \(%esp,%eiz,4\),%eax +[ ]*[a-f0-9]+: 8b 04 e4 mov \(%esp,%eiz,8\),%eax +#pass diff --git a/gas/testsuite/gas/i386/sib.s b/gas/testsuite/gas/i386/sib.s index 25d88b7..f11d6d2 100644 --- a/gas/testsuite/gas/i386/sib.s +++ b/gas/testsuite/gas/i386/sib.s @@ -1,11 +1,16 @@ #Test the special case of the index bits, 0x4, in SIB. .text + .allow_index_reg 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 + mov (%ebx),%eax + mov (%ebx,%eiz,1),%eax + mov (%ebx,%eiz,2),%eax + mov (%ebx,%eiz,4),%eax + mov (%ebx,%eiz,8),%eax + mov (%esp),%eax + mov (%esp,%eiz,1),%eax + mov (%esp,%eiz,2),%eax + mov (%esp,%eiz,4),%eax + mov (%esp,%eiz,8),%eax + .p2align 4 diff --git a/gas/testsuite/gas/i386/x86-64-sib-intel.d b/gas/testsuite/gas/i386/x86-64-sib-intel.d new file mode 100644 index 0000000..0dce66f --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-sib-intel.d @@ -0,0 +1,21 @@ +#source: x86-64-sib.s +#as: -J +#objdump: -dw -Mintel +#name: x86-64 SIB (Intel mode) + +.*: +file format .* + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 8b 03 mov eax,DWORD PTR \[rbx\] +[ ]*[a-f0-9]+: 8b 04 23 mov eax,DWORD PTR \[rbx\+riz\*1\] +[ ]*[a-f0-9]+: 8b 04 63 mov eax,DWORD PTR \[rbx\+riz\*2\] +[ ]*[a-f0-9]+: 8b 04 a3 mov eax,DWORD PTR \[rbx\+riz\*4\] +[ ]*[a-f0-9]+: 8b 04 e3 mov eax,DWORD PTR \[rbx\+riz\*8\] +[ ]*[a-f0-9]+: 8b 04 24 mov eax,DWORD PTR \[rsp\] +[ ]*[a-f0-9]+: 8b 04 24 mov eax,DWORD PTR \[rsp\] +[ ]*[a-f0-9]+: 8b 04 64 mov eax,DWORD PTR \[rsp\+riz\*2\] +[ ]*[a-f0-9]+: 8b 04 a4 mov eax,DWORD PTR \[rsp\+riz\*4\] +[ ]*[a-f0-9]+: 8b 04 e4 mov eax,DWORD PTR \[rsp\+riz\*8\] +#pass diff --git a/gas/testsuite/gas/i386/x86-64-sib.d b/gas/testsuite/gas/i386/x86-64-sib.d new file mode 100644 index 0000000..32e02be --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-sib.d @@ -0,0 +1,20 @@ +#as: -J +#objdump: -dw +#name: x86-64 SIB + +.*: +file format .* + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 8b 03 mov \(%rbx\),%eax +[ ]*[a-f0-9]+: 8b 04 23 mov \(%rbx,%riz,1\),%eax +[ ]*[a-f0-9]+: 8b 04 63 mov \(%rbx,%riz,2\),%eax +[ ]*[a-f0-9]+: 8b 04 a3 mov \(%rbx,%riz,4\),%eax +[ ]*[a-f0-9]+: 8b 04 e3 mov \(%rbx,%riz,8\),%eax +[ ]*[a-f0-9]+: 8b 04 24 mov \(%rsp\),%eax +[ ]*[a-f0-9]+: 8b 04 24 mov \(%rsp\),%eax +[ ]*[a-f0-9]+: 8b 04 64 mov \(%rsp,%riz,2\),%eax +[ ]*[a-f0-9]+: 8b 04 a4 mov \(%rsp,%riz,4\),%eax +[ ]*[a-f0-9]+: 8b 04 e4 mov \(%rsp,%riz,8\),%eax +#pass diff --git a/gas/testsuite/gas/i386/x86-64-sib.s b/gas/testsuite/gas/i386/x86-64-sib.s new file mode 100644 index 0000000..26ab395 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-sib.s @@ -0,0 +1,16 @@ +#Test the special case of the index bits, 0x4, in SIB. + + .text + .allow_index_reg +foo: + mov (%rbx),%eax + mov (%rbx,%riz,1),%eax + mov (%rbx,%riz,2),%eax + mov (%rbx,%riz,4),%eax + mov (%rbx,%riz,8),%eax + mov (%rsp),%eax + mov (%rsp,%riz,1),%eax + mov (%rsp,%riz,2),%eax + mov (%rsp,%riz,4),%eax + mov (%rsp,%riz,8),%eax + .p2align 4 |