diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-09-14 10:49:43 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-09-14 10:49:53 -0700 |
commit | d20dee9efad3c23c9098f03ac785037572258483 (patch) | |
tree | 170cde5009a0f2cd1b07497e36b3140251d62b46 /gas | |
parent | 5074ad8a66ab2e955cf3ae4dba5773d5aa67b29b (diff) | |
download | gdb-d20dee9efad3c23c9098f03ac785037572258483.zip gdb-d20dee9efad3c23c9098f03ac785037572258483.tar.gz gdb-d20dee9efad3c23c9098f03ac785037572258483.tar.bz2 |
x86: Properly decode EVEX.W in vcvt[u]si2s[sd] in 32-bit mode
Update x86 disassembler to ignore the EVEX.W bit in EVEX vcvt[u]si2s[sd]
instructions in 32-bit mode.
gas/
PR binutils/23655
* testsuite/gas/i386/evex.d: New file.
* testsuite/gas/i386/evex.s: Likewise.
* testsuite/gas/i386/i386.exp: Run evex.
opcodes/
PR binutils/23655
* i386-dis-evex.h (evex_table): Replace Eq with Edqa for
vcvtsi2ss%LQ, vcvtsi2sd%LQ, vcvtusi2ss%LQ and vcvtusi2sd%LQ.
* i386-dis.c (Edqa): New.
(dqa_mode): Likewise.
(intel_operand_size): Handle dqa_mode as m_mode.
(OP_E_register): Handle dqa_mode as dq_mode.
(OP_E_memory): Set shift for dqa_mode based on address_mode.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex.d | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex.s | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 1 |
4 files changed, 35 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 37a864a..52346d7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2018-09-14 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/23655 + * testsuite/gas/i386/evex.d: New file. + * testsuite/gas/i386/evex.s: Likewise. + * testsuite/gas/i386/i386.exp: Run evex. + 2018-09-10 Lifang Xia <lifang_xia@c-sky.com> * config/tc-csky.c (md_apply_fix): Transmit BFD_RELOC_32_PCREL to diff --git a/gas/testsuite/gas/i386/evex.d b/gas/testsuite/gas/i386/evex.d new file mode 100644 index 0000000..ffbcdc1 --- /dev/null +++ b/gas/testsuite/gas/i386/evex.d @@ -0,0 +1,16 @@ +#objdump: -dw -Msuffix +#name: i386 EVX insns + +.*: +file format .* + + +Disassembly of section .text: + +0+ <_start>: + +[a-f0-9]+: 62 f1 d6 38 2a f0 vcvtsi2ssl %eax,\{rd-sae\},%xmm5,%xmm6 + +[a-f0-9]+: 62 f1 d7 38 2a f0 vcvtsi2sdl %eax,\{rd-sae\},%xmm5,%xmm6 + +[a-f0-9]+: 62 f1 d6 08 7b f0 vcvtusi2ssl %eax,%xmm5,%xmm6 + +[a-f0-9]+: 62 f1 d7 08 7b f0 vcvtusi2sdl %eax,%xmm5,%xmm6 + +[a-f0-9]+: 62 f1 d6 38 7b f0 vcvtusi2ssl %eax,\{rd-sae\},%xmm5,%xmm6 + +[a-f0-9]+: 62 f1 d7 38 7b f0 vcvtusi2sdl %eax,\{rd-sae\},%xmm5,%xmm6 +#pass diff --git a/gas/testsuite/gas/i386/evex.s b/gas/testsuite/gas/i386/evex.s new file mode 100644 index 0000000..a64cc57 --- /dev/null +++ b/gas/testsuite/gas/i386/evex.s @@ -0,0 +1,11 @@ +# Check EVEX instructions + + .allow_index_reg + .text +_start: + .byte 0x62, 0xf1, 0xd6, 0x38, 0x2a, 0xf0 + .byte 0x62, 0xf1, 0xd7, 0x38, 0x2a, 0xf0 + .byte 0x62, 0xf1, 0xd6, 0x08, 0x7b, 0xf0 + .byte 0x62, 0xf1, 0xd7, 0x08, 0x7b, 0xf0 + .byte 0x62, 0xf1, 0xd6, 0x38, 0x7b, 0xf0 + .byte 0x62, 0xf1, 0xd7, 0x38, 0x7b, 0xf0 diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 088fece..203def9 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -226,6 +226,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "avx512er-intel" run_dump_test "avx512pf" run_dump_test "avx512pf-intel" + run_dump_test "evex" run_dump_test "evex-lig256" run_dump_test "evex-lig512" run_dump_test "evex-lig256-intel" |