diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-09-27 18:31:51 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-09-27 18:31:51 +0000 |
commit | 7c52e0e8658a0ea03067c301a15e793cf9f1c208 (patch) | |
tree | 0ca931f76403e20a53fc6d1e8b4d988c6f22237f /gas/testsuite | |
parent | 7a4d50bfe016959b5bb6e11433b0d38899c02458 (diff) | |
download | gdb-7c52e0e8658a0ea03067c301a15e793cf9f1c208.zip gdb-7c52e0e8658a0ea03067c301a15e793cf9f1c208.tar.gz gdb-7c52e0e8658a0ea03067c301a15e793cf9f1c208.tar.bz2 |
gas/testsuite/gas/
2007-09-27 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/5072
* gas/i386/i386.exp: Run x86-64-opcode-inval and
x86-64-opcode-inval-intel.
* gas/i386/x86-64-opcode-inval-intel.d: New.
* gas/i386/x86-64-opcode-inval.d: Likewise.
* gas/i386/x86-64-opcode-inval.s: Likewise.
opcodes/
2007-09-27 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/5072
* i386-dis.c: Update comments on '{', '}' and '|' to support
only AT&T and Intel modes.
(X86_64_4...X86_64_27): New.
(dis386): Updated. Use X86_64_4...X86_64_21.
(dis386_twobyte): Updated.
(float_mem): Likewise.
(x86_64_table): Add X86_64_4...X86_64_27.
(opc_ext_table): Updated. Use X86_64_22 and X86_64_27.
(putop): Updated handling of '{', '}' and '|' to support only
AT&T and Intel modes.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d | 58 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-opcode-inval.d | 57 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-opcode-inval.s | 30 |
5 files changed, 157 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 32d5263..6f8d27d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2007-09-27 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/5072 + * gas/i386/i386.exp: Run x86-64-opcode-inval and + x86-64-opcode-inval-intel. + + * gas/i386/x86-64-opcode-inval-intel.d: New. + * gas/i386/x86-64-opcode-inval.d: Likewise. + * gas/i386/x86-64-opcode-inval.s: Likewise. + 2007-09-27 Kazu Hirata <kazu@codesourcery.com> * gas/m68k/fido.s: Add tests for %mbo. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 9807432..584d315 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -199,6 +199,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-reg-intel" run_dump_test "x86-64-sib" run_dump_test "x86-64-sib-intel" + run_dump_test "x86-64-opcode-inval" + run_dump_test "x86-64-opcode-inval-intel" if { ![istarget "*-*-aix*"] && ![istarget "*-*-beos*"] diff --git a/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d b/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d new file mode 100644 index 0000000..cb0fdbf --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-opcode-inval-intel.d @@ -0,0 +1,58 @@ +#as: --32 +#source: x86-64-opcode-inval.s +#objdump: -dw -Mx86-64 -Mintel +#name: 64bit illegal opcodes (Intel mode) + +.*: +file format .* + +Disassembly of section .text: + +0+ <aaa>: +[ ]*[a-f0-9]+: 37 \(bad\) + +0+1 <aad0>: +[ ]*[a-f0-9]+: d5 \(bad\) +[ ]*[a-f0-9]+: 0a d5 or dl,ch + +0+3 <aad1>: +[ ]*[a-f0-9]+: d5 \(bad\) +[ ]*[a-f0-9]+: 02 d4 add dl,ah + +0+5 <aam0>: +[ ]*[a-f0-9]+: d4 \(bad\) +[ ]*[a-f0-9]+: 0a d4 or dl,ah + +0+7 <aam1>: +[ ]*[a-f0-9]+: d4 \(bad\) +[ ]*[a-f0-9]+: 02 3f add bh,BYTE PTR \[rdi\] + +0+9 <aas>: +[ ]*[a-f0-9]+: 3f \(bad\) + +0+a <bound>: +[ ]*[a-f0-9]+: 62 \(bad\) +[ ]*[a-f0-9]+: 10 27 adc BYTE PTR \[rdi\],ah + +0+c <daa>: +[ ]*[a-f0-9]+: 27 \(bad\) + +0+d <das>: +[ ]*[a-f0-9]+: 2f \(bad\) + +0+e <into>: +[ ]*[a-f0-9]+: ce \(bad\) + +0+f <lds>: +[ ]*[a-f0-9]+: c5 \(bad\) +[ ]*[a-f0-9]+: 10 c4 adc ah,al + +0+11 <les>: +[ ]*[a-f0-9]+: c4 \(bad\) +[ ]*[a-f0-9]+: 10 60 61 adc BYTE PTR \[rax\+0x61\],ah + +0+13 <pusha>: +[ ]*[a-f0-9]+: 60 \(bad\) + +0+14 <popa>: +[ ]*[a-f0-9]+: 61 \(bad\) +#pass diff --git a/gas/testsuite/gas/i386/x86-64-opcode-inval.d b/gas/testsuite/gas/i386/x86-64-opcode-inval.d new file mode 100644 index 0000000..fab3192 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-opcode-inval.d @@ -0,0 +1,57 @@ +#as: --32 +#objdump: -dw -Mx86-64 +#name: 64bit illegal opcodes + +.*: +file format .* + +Disassembly of section .text: + +0+ <aaa>: +[ ]*[a-f0-9]+: 37 \(bad\) + +0+1 <aad0>: +[ ]*[a-f0-9]+: d5 \(bad\) +[ ]*[a-f0-9]+: 0a d5 or %ch,%dl + +0+3 <aad1>: +[ ]*[a-f0-9]+: d5 \(bad\) +[ ]*[a-f0-9]+: 02 d4 add %ah,%dl + +0+5 <aam0>: +[ ]*[a-f0-9]+: d4 \(bad\) +[ ]*[a-f0-9]+: 0a d4 or %ah,%dl + +0+7 <aam1>: +[ ]*[a-f0-9]+: d4 \(bad\) +[ ]*[a-f0-9]+: 02 3f add \(%rdi\),%bh + +0+9 <aas>: +[ ]*[a-f0-9]+: 3f \(bad\) + +0+a <bound>: +[ ]*[a-f0-9]+: 62 \(bad\) +[ ]*[a-f0-9]+: 10 27 adc %ah,\(%rdi\) + +0+c <daa>: +[ ]*[a-f0-9]+: 27 \(bad\) + +0+d <das>: +[ ]*[a-f0-9]+: 2f \(bad\) + +0+e <into>: +[ ]*[a-f0-9]+: ce \(bad\) + +0+f <lds>: +[ ]*[a-f0-9]+: c5 \(bad\) +[ ]*[a-f0-9]+: 10 c4 adc %al,%ah + +0+11 <les>: +[ ]*[a-f0-9]+: c4 \(bad\) +[ ]*[a-f0-9]+: 10 60 61 adc %ah,0x61\(%rax\) + +0+13 <pusha>: +[ ]*[a-f0-9]+: 60 \(bad\) + +0+14 <popa>: +[ ]*[a-f0-9]+: 61 \(bad\) +#pass diff --git a/gas/testsuite/gas/i386/x86-64-opcode-inval.s b/gas/testsuite/gas/i386/x86-64-opcode-inval.s new file mode 100644 index 0000000..6eb4879 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-opcode-inval.s @@ -0,0 +1,30 @@ + .text +# All the followings are illegal opcodes for x86-64. +aaa: + aaa +aad0: + aad +aad1: + aad $2 +aam0: + aam +aam1: + aam $2 +aas: + aas +bound: + bound %edx,(%eax) +daa: + daa +das: + das +into: + into +lds: + lds (%eax),%edx +les: + les (%eax),%edx +pusha: + pusha +popa: + popa |