diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-09-28 15:34:53 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-09-28 15:34:53 +0000 |
commit | 1a114b128470b4119aa3c32d8fd61ed581b4ede3 (patch) | |
tree | 380edf1b3f14acda26e33ecc9810317306c8d013 /gas | |
parent | e05278afa3c5b5aa74f9694f7aac576f437c7e1b (diff) | |
download | gdb-1a114b128470b4119aa3c32d8fd61ed581b4ede3.zip gdb-1a114b128470b4119aa3c32d8fd61ed581b4ede3.tar.gz gdb-1a114b128470b4119aa3c32d8fd61ed581b4ede3.tar.bz2 |
gas/testsuite/
2005-09-28 Jan Beulich <jbeulich@novell.com>
* gas/i386/x86-64-stack.s, gas/i386/x86-64-stack.d,
gas/i386/x86-64-stack-suffix.d, gas/i386/x86-64-stack-intel.d: New.
* gas/i386/i386.exp: Run new tests.
ld/testsuite/
2005-09-28 Jan Beulich <jbeulich@novell.com>
* ld-x86-64/tlspic.dd: Adjust.
opcodes/
2005-09-28 Jan Beulich <jbeulich@novell.com>
* i386-dis.c (stack_v_mode): Renamed from branch_v_mode.
(indirEv): Use it.
(stackEv): New.
(Ob64, Ov64): Rename to Ob, Ov. Delete unused original definitions.
(dis386): Document and use new 'V' meta character. Use it for
single-byte push/pop opcode forms. Use stackEv for mod-r/m push/pop
opcode forms. Correct typo in 'pop ss'. Replace Ob64/Ov64 by Ob/Ov.
(putop): 'q' suffix for 'T' and 'U' meta depends on DFLAG. Mark
data prefix as used whenever DFLAG was examined. Handle 'V'.
(intel_operand_size): Use stack_v_mode.
(OP_E): Use stack_v_mode, but handle only the special case of
64-bit mode without operand size override here; fall through to
v_mode case otherwise.
(OP_REG): Special case rAX_reg ... rDI_reg only when 64-bit mode
and no operand size override is present.
(OP_J): Use get32s for obtaining the displacement also when rex64
is present.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack-intel.d | 40 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack-suffix.d | 40 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack.d | 39 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-stack.s | 23 |
6 files changed, 151 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5416d28..13be273 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2005-09-28 Jan Beulich <jbeulich@novell.com> + * gas/i386/x86-64-stack.s, gas/i386/x86-64-stack.d, + gas/i386/x86-64-stack-suffix.d, gas/i386/x86-64-stack-intel.d: New. + * gas/i386/i386.exp: Run new tests. + +2005-09-28 Jan Beulich <jbeulich@novell.com> + * gas/i386/mixed-mode-reloc.s: Enable all insns. * gas/i386/mixed-mode-reloc32.d: Adjust. * gas/i386/mixed-mode-reloc64.d: Adjust. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 0e3f696..0c32a48 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -131,6 +131,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-opcode" run_dump_test "x86-64-pcrel" run_dump_test "x86-64-rip" + run_dump_test "x86-64-stack" + run_dump_test "x86-64-stack-intel" + run_dump_test "x86-64-stack-suffix" run_list_test "x86-64-inval" "-al" run_list_test "x86-64-segment" "-al" run_list_test "x86-64-inval-seg" "-al" diff --git a/gas/testsuite/gas/i386/x86-64-stack-intel.d b/gas/testsuite/gas/i386/x86-64-stack-intel.d new file mode 100644 index 0000000..0dfab4d --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-stack-intel.d @@ -0,0 +1,40 @@ +#objdump: -dwMintel +#name: x86-64 stack-related opcodes (Intel mode) +#source: x86-64-stack.s + +.*: +file format elf64-x86-64 + +Disassembly of section .text: + +0+ <_start>: +[ ]*[0-9a-f]+:[ ]+50[ ]+push[ ]+rax +[ ]*[0-9a-f]+:[ ]+66 50[ ]+push[ ]+ax +[ ]*[0-9a-f]+:[ ]+66 48 50[ ]+push[ ]+rax +[ ]*[0-9a-f]+:[ ]+58[ ]+pop[ ]+rax +[ ]*[0-9a-f]+:[ ]+66 58[ ]+pop[ ]+ax +[ ]*[0-9a-f]+:[ ]+66 48 58[ ]+pop[ ]+rax +[ ]*[0-9a-f]+:[ ]+8f c0[ ]+pop[ ]+rax +[ ]*[0-9a-f]+:[ ]+66 8f c0[ ]+pop[ ]+ax +[ ]*[0-9a-f]+:[ ]+66 48 8f c0[ ]+pop[ ]+rax +[ ]*[0-9a-f]+:[ ]+8f 00[ ]+pop[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 8f 00[ ]+pop[ ]+WORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 48 8f 00[ ]+pop[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+ff d0[ ]+call[ ]+rax +[ ]*[0-9a-f]+:[ ]+66 ff d0[ ]+call[ ]+ax +[ ]*[0-9a-f]+:[ ]+66 48 ff d0[ ]+call[ ]+rax +[ ]*[0-9a-f]+:[ ]+ff 10[ ]+call[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 ff 10[ ]+call[ ]+WORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 48 ff 10[ ]+call[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+ff e0[ ]+jmp[ ]+rax +[ ]*[0-9a-f]+:[ ]+66 ff e0[ ]+jmp[ ]+ax +[ ]*[0-9a-f]+:[ ]+66 48 ff e0[ ]+jmp[ ]+rax +[ ]*[0-9a-f]+:[ ]+ff 20[ ]+jmp[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 ff 20[ ]+jmp[ ]+WORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 48 ff 20[ ]+jmp[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+ff f0[ ]+push[ ]+rax +[ ]*[0-9a-f]+:[ ]+66 ff f0[ ]+push[ ]+ax +[ ]*[0-9a-f]+:[ ]+66 48 ff f0[ ]+push[ ]+rax +[ ]*[0-9a-f]+:[ ]+ff 30[ ]+push[ ]+QWORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 ff 30[ ]+push[ ]+WORD PTR \[rax\] +[ ]*[0-9a-f]+:[ ]+66 48 ff 30[ ]+push[ ]+QWORD PTR \[rax\] +#pass diff --git a/gas/testsuite/gas/i386/x86-64-stack-suffix.d b/gas/testsuite/gas/i386/x86-64-stack-suffix.d new file mode 100644 index 0000000..c5d789d --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-stack-suffix.d @@ -0,0 +1,40 @@ +#objdump: -dwMsuffix +#name: x86-64 stack-related opcodes (with suffixes) +#source: x86-64-stack.s + +.*: +file format elf64-x86-64 + +Disassembly of section .text: + +0+ <_start>: +[ ]*[0-9a-f]+:[ ]+50[ ]+pushq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 50[ ]+pushw[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 50[ ]+pushq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+58[ ]+popq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 58[ ]+popw[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 58[ ]+popq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+8f c0[ ]+popq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 8f c0[ ]+popw[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 8f c0[ ]+popq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+8f 00[ ]+popq[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 8f 00[ ]+popw[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 8f 00[ ]+popq[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+ff d0[ ]+callq[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+66 ff d0[ ]+callw[ ]+\*%ax +[ ]*[0-9a-f]+:[ ]+66 48 ff d0[ ]+callq[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+ff 10[ ]+callq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 ff 10[ ]+callw[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 ff 10[ ]+callq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+ff e0[ ]+jmpq[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+66 ff e0[ ]+jmpw[ ]+\*%ax +[ ]*[0-9a-f]+:[ ]+66 48 ff e0[ ]+jmpq[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+ff 20[ ]+jmpq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 ff 20[ ]+jmpw[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 ff 20[ ]+jmpq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+ff f0[ ]+pushq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 ff f0[ ]+pushw[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 ff f0[ ]+pushq[ ]+%rax +[ ]*[0-9a-f]+:[ ]+ff 30[ ]+pushq[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 ff 30[ ]+pushw[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 ff 30[ ]+pushq[ ]+\(%rax\) +#pass diff --git a/gas/testsuite/gas/i386/x86-64-stack.d b/gas/testsuite/gas/i386/x86-64-stack.d new file mode 100644 index 0000000..fa010a9 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-stack.d @@ -0,0 +1,39 @@ +#objdump: -dw +#name: x86-64 stack-related opcodes + +.*: +file format elf64-x86-64 + +Disassembly of section .text: + +0+ <_start>: +[ ]*[0-9a-f]+:[ ]+50[ ]+pushq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 50[ ]+pushw?[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 50[ ]+pushq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+58[ ]+popq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 58[ ]+popw?[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 58[ ]+popq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+8f c0[ ]+popq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 8f c0[ ]+popw?[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 8f c0[ ]+popq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+8f 00[ ]+popq[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 8f 00[ ]+popw[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 8f 00[ ]+popq[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+ff d0[ ]+callq?[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+66 ff d0[ ]+callw?[ ]+\*%ax +[ ]*[0-9a-f]+:[ ]+66 48 ff d0[ ]+callq?[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+ff 10[ ]+callq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 ff 10[ ]+callw[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 ff 10[ ]+callq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+ff e0[ ]+jmpq?[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+66 ff e0[ ]+jmpw?[ ]+\*%ax +[ ]*[0-9a-f]+:[ ]+66 48 ff e0[ ]+jmpq?[ ]+\*%rax +[ ]*[0-9a-f]+:[ ]+ff 20[ ]+jmpq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 ff 20[ ]+jmpw[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 ff 20[ ]+jmpq[ ]+\*\(%rax\) +[ ]*[0-9a-f]+:[ ]+ff f0[ ]+pushq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+66 ff f0[ ]+pushw?[ ]+%ax +[ ]*[0-9a-f]+:[ ]+66 48 ff f0[ ]+pushq?[ ]+%rax +[ ]*[0-9a-f]+:[ ]+ff 30[ ]+pushq[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 ff 30[ ]+pushw[ ]+\(%rax\) +[ ]*[0-9a-f]+:[ ]+66 48 ff 30[ ]+pushq[ ]+\(%rax\) +#pass diff --git a/gas/testsuite/gas/i386/x86-64-stack.s b/gas/testsuite/gas/i386/x86-64-stack.s new file mode 100644 index 0000000..e0fc046 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-stack.s @@ -0,0 +1,23 @@ + .macro try bytes:vararg + .byte \bytes + .byte 0x66, \bytes + .byte 0x66, 0x48, \bytes + .endm + + .text + +_start: + try 0x50 + try 0x58 + + try 0x8f, 0xc0 + try 0x8f, 0x00 + + try 0xff, 0xd0 + try 0xff, 0x10 + + try 0xff, 0xe0 + try 0xff, 0x20 + + try 0xff, 0xf0 + try 0xff, 0x30 |