diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-11-06 11:45:49 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-11-06 11:45:49 +0100 |
commit | 4dd4e6394509d58685daea52cc6947c45fd7ee9d (patch) | |
tree | 5f96f49b0e77e83bc3b2acbb6593272b12be9b4a | |
parent | 9819647a63bfca45a879650ac23fe80f51b89edb (diff) | |
download | binutils-4dd4e6394509d58685daea52cc6947c45fd7ee9d.zip binutils-4dd4e6394509d58685daea52cc6947c45fd7ee9d.tar.gz binutils-4dd4e6394509d58685daea52cc6947c45fd7ee9d.tar.bz2 |
x86: correctly handle VPBROADCASTD with EVEX.W set outside of 64-bit mode
For the flavor having a GPR operand EVEX.W is ignored outside of 64-bit
mode. The mnemonic should therefore not be VPBROADCASTQ.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex-wig.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex-wig1-intel.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex-wig1.d | 1 | ||||
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/i386-dis-evex.h | 2 |
6 files changed, 16 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d3300ac..ffff821 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2018-11-06 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/evex-wig.s: Add vpbroadcastd cases. + * testsuite/gas/i386/evex-wig.d, + testsuite/gas/i386/evex-wig1-intel.d: Adjust expectations. + +2018-11-06 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/evex-wig.s: Add vmovd cases. * testsuite/gas/i386/evex-wig.d, testsuite/gas/i386/evex-wig1-intel.d: Adjust expectations. diff --git a/gas/testsuite/gas/i386/evex-wig.s b/gas/testsuite/gas/i386/evex-wig.s index 593b6fd..df73c78 100644 --- a/gas/testsuite/gas/i386/evex-wig.s +++ b/gas/testsuite/gas/i386/evex-wig.s @@ -41,6 +41,8 @@ _start: {evex} vmovd %xmm0, %eax {evex} vmovd %xmm0, 4(%eax) + vpbroadcastd %eax, %xmm0 + {evex} vpextrb $0, %xmm0, %eax {evex} vpextrb $0, %xmm0, 1(%eax) diff --git a/gas/testsuite/gas/i386/evex-wig1-intel.d b/gas/testsuite/gas/i386/evex-wig1-intel.d index 7d020f6..0bf2be8 100644 --- a/gas/testsuite/gas/i386/evex-wig1-intel.d +++ b/gas/testsuite/gas/i386/evex-wig1-intel.d @@ -31,6 +31,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 62 f1 fd 08 6e 40 01 vmovd xmm0,DWORD PTR \[eax\+0x4\] [ ]*[a-f0-9]+: 62 f1 fd 08 7e c0 vmovd eax,xmm0 [ ]*[a-f0-9]+: 62 f1 fd 08 7e 40 01 vmovd DWORD PTR \[eax\+0x4\],xmm0 +[ ]*[a-f0-9]+: 62 f2 fd 08 7c c0 vpbroadcastd xmm0,eax [ ]*[a-f0-9]+: 62 f3 fd 08 14 c0 00 vpextrb eax,xmm0,0x0 [ ]*[a-f0-9]+: 62 f3 fd 08 14 40 01 00 vpextrb BYTE PTR \[eax\+0x1\],xmm0,0x0 [ ]*[a-f0-9]+: 62 f3 fd 08 16 c0 00 vpextrd eax,xmm0,0x0 diff --git a/gas/testsuite/gas/i386/evex-wig1.d b/gas/testsuite/gas/i386/evex-wig1.d index bb24083..45366c1 100644 --- a/gas/testsuite/gas/i386/evex-wig1.d +++ b/gas/testsuite/gas/i386/evex-wig1.d @@ -31,6 +31,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 62 f1 fd 08 6e 40 01 vmovd 0x4\(%eax\),%xmm0 [ ]*[a-f0-9]+: 62 f1 fd 08 7e c0 vmovd %xmm0,%eax [ ]*[a-f0-9]+: 62 f1 fd 08 7e 40 01 vmovd %xmm0,0x4\(%eax\) +[ ]*[a-f0-9]+: 62 f2 fd 08 7c c0 vpbroadcastd %eax,%xmm0 [ ]*[a-f0-9]+: 62 f3 fd 08 14 c0 00 vpextrb \$0x0,%xmm0,%eax [ ]*[a-f0-9]+: 62 f3 fd 08 14 40 01 00 vpextrb \$0x0,%xmm0,0x1\(%eax\) [ ]*[a-f0-9]+: 62 f3 fd 08 16 c0 00 vpextrd \$0x0,%xmm0,%eax diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 70b95f3..ce55624 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,10 @@ 2018-11-06 Jan Beulich <jbeulich@suse.com> + * i386-dis-evex.h (evex_table): Use K suffix instead of %LW for + vpbroadcast{d,q} with GPR operand. + +2018-11-06 Jan Beulich <jbeulich@suse.com> + * i386-dis.c (EVEX_W_0F6E_P_2, EVEX_W_0F7E_P_2): Delete. * i386-dis-evex.h (evex_table): Move vmov[dq} with GPR operand cases up one level in the hierarchy. diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h index 84eaf83..dec7fc4 100644 --- a/opcodes/i386-dis-evex.h +++ b/opcodes/i386-dis-evex.h @@ -2167,7 +2167,7 @@ static const struct dis386 evex_table[][256] = { { { Bad_Opcode }, { Bad_Opcode }, - { "vpbroadcast%LW", { XM, Rdq }, 0 }, + { "vpbroadcastK", { XM, Rdq }, 0 }, }, /* PREFIX_EVEX_0F387D */ { |