diff options
author | Cui,Lili <lili.cui@intel.com> | 2021-09-28 11:13:33 +0800 |
---|---|---|
committer | Cui,Lili <lili.cui@intel.com> | 2021-09-28 11:13:50 +0800 |
commit | 2c02075a8ec5223bc4cbcc9561eb91e28d46a9e5 (patch) | |
tree | e256cbf3e6f20078a9ed58e2bac723e52b926382 /gas | |
parent | 901b98215e767bbffb1bfa869e02d7dc5ea786ec (diff) | |
download | gdb-2c02075a8ec5223bc4cbcc9561eb91e28d46a9e5.zip gdb-2c02075a8ec5223bc4cbcc9561eb91e28d46a9e5.tar.gz gdb-2c02075a8ec5223bc4cbcc9561eb91e28d46a9e5.tar.bz2 |
x86: Print {bad} on invalid broadcast in OP_E_memory
Don't print broadcast for scalar_mode, and print {bad} for invalid broadcast.
gas/
PR binutils/28381
* testsuite/gas/i386/bad-bcast.s: Add a new testcase.
* testsuite/gas/i386/bad-bcast.d: Likewise.
* testsuite/gas/i386/bad-bcast-intel.d: New.
opcodes/
PR binutils/28381
* i386-dis.c (static struct): Add no_broadcast.
(OP_E_memory): Mark invalid broadcast with no_broadcast=1 and Print "{bad}"for it.
(intel_operand_size): mark invalid broadcast with no_broadcast=1.
(OP_XMM): Mark scalar_mode with no_broadcast=1.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/i386/bad-bcast-intel.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bad-bcast.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/bad-bcast.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 1 |
4 files changed, 23 insertions, 5 deletions
diff --git a/gas/testsuite/gas/i386/bad-bcast-intel.d b/gas/testsuite/gas/i386/bad-bcast-intel.d new file mode 100644 index 0000000..29de3de --- /dev/null +++ b/gas/testsuite/gas/i386/bad-bcast-intel.d @@ -0,0 +1,15 @@ +#source: bad-bcast.s +#objdump: -dw -Mintel +#name: Disassemble bad broadcast (Intel mode) + +.*: +file format .* + +Disassembly of section .text: + +0+ <.text>: +[ ]*[a-f0-9]+:[ ]*62 c3 8c 1d 66\s*\(bad\) +[ ]*[a-f0-9]+:[ ]*90\s*nop +[ ]*[a-f0-9]+:[ ]*66 90\s*xchg ax,ax +[ ]*[a-f0-9]+:[ ]*66 90\s*xchg ax,ax +[ ]*[a-f0-9]+:[ ]*62 c1 ff 38 2a 20\s*vcvtsi2sd xmm4,xmm0,\[eax\]{bad} +#pass diff --git a/gas/testsuite/gas/i386/bad-bcast.d b/gas/testsuite/gas/i386/bad-bcast.d index 9fc474a..4f82925 100644 --- a/gas/testsuite/gas/i386/bad-bcast.d +++ b/gas/testsuite/gas/i386/bad-bcast.d @@ -7,8 +7,8 @@ Disassembly of section .text: 0+ <.text>: - +[a-f0-9]+: 62 .byte 0x62 - +[a-f0-9]+: c3 ret - +[a-f0-9]+: 8c 1d 66 90 66 90 mov %ds,0x90669066 - +[a-f0-9]+: 66 90 xchg %ax,%ax -#pass + +[a-f0-9]+: 62 c3 8c 1d 66\s+\(bad\) + +[a-f0-9]+: 90\s+nop + +[a-f0-9]+: 66 90\s+xchg %ax,%ax + +[a-f0-9]+: 66 90\s+xchg %ax,%ax + +[a-f0-9]+: 62 c1 ff 38 2a 20\s+vcvtsi2sd \(%eax\){bad},%xmm0,%xmm4 diff --git a/gas/testsuite/gas/i386/bad-bcast.s b/gas/testsuite/gas/i386/bad-bcast.s index 3e49b22..6c55dcb 100644 --- a/gas/testsuite/gas/i386/bad-bcast.s +++ b/gas/testsuite/gas/i386/bad-bcast.s @@ -1,3 +1,5 @@ .text # Invalid 16-bit broadcast with EVEX.W == 1. .byte 0x62, 0xc3, 0x8c, 0x1d, 0x66, 0x90, 0x66, 0x90, 0x66, 0x90 +# Invalid vcvtsi2sd with EVEX.b == 1. + .byte 0x62,0xc1,0xff,0x38,0x2a,0x20 diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 8095972..680259b 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -646,6 +646,7 @@ if [gas_32_check] then { run_dump_test "dw2-compress-2" run_dump_test "dw2-compressed-2" + run_dump_test "bad-bcast-intel" run_dump_test "bad-bcast" run_dump_test "bad-size" |