diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-11-06 11:45:11 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-11-06 11:45:11 +0100 |
commit | 9819647a63bfca45a879650ac23fe80f51b89edb (patch) | |
tree | b66dab102a91cab94582794f77b2ec8ae96f2a81 /gas | |
parent | 58a211d2602df0a39779c84a344b1b4d12deb2d0 (diff) | |
download | gdb-9819647a63bfca45a879650ac23fe80f51b89edb.zip gdb-9819647a63bfca45a879650ac23fe80f51b89edb.tar.gz gdb-9819647a63bfca45a879650ac23fe80f51b89edb.tar.bz2 |
x86: correctly handle VMOVD with EVEX.W set outside of 64-bit mode
For the flavors having a GPR operand EVEX.W is ignored outside of 64-bit
mode. The mnemonic should therefore not be KMOVQ, the GPR operand should
not name a non-existing 64-bit register, just like is already the case
for the AVX counterparts, and the Disp8 scaling factor should be 4
rather than 8.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex-wig.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex-wig1-intel.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/evex-wig1.d | 4 |
4 files changed, 20 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 967f6bc..d3300ac 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 vmovd 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/avx-wig.s: Add kmovd cases. * testsuite/gas/i386/avx-wig.d: Adjust expectations. diff --git a/gas/testsuite/gas/i386/evex-wig.s b/gas/testsuite/gas/i386/evex-wig.s index 0694f96..593b6fd 100644 --- a/gas/testsuite/gas/i386/evex-wig.s +++ b/gas/testsuite/gas/i386/evex-wig.s @@ -35,6 +35,12 @@ _start: {evex} vextractps $0, %xmm0, %eax {evex} vextractps $0, %xmm0, 4(%eax) + {evex} vmovd %eax, %xmm0 + {evex} vmovd 4(%eax), %xmm0 + + {evex} vmovd %xmm0, %eax + {evex} vmovd %xmm0, 4(%eax) + {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 f6a28e8..7d020f6 100644 --- a/gas/testsuite/gas/i386/evex-wig1-intel.d +++ b/gas/testsuite/gas/i386/evex-wig1-intel.d @@ -27,6 +27,10 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 62 f1 ff 08 78 c0 vcvttsd2usi eax,xmm0 [ ]*[a-f0-9]+: 62 f3 fd 08 17 c0 00 vextractps eax,xmm0,0x0 [ ]*[a-f0-9]+: 62 f3 fd 08 17 40 01 00 vextractps DWORD PTR \[eax\+0x4\],xmm0,0x0 +[ ]*[a-f0-9]+: 62 f1 fd 08 6e c0 vmovd xmm0,eax +[ ]*[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 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 c69f54c..bb24083 100644 --- a/gas/testsuite/gas/i386/evex-wig1.d +++ b/gas/testsuite/gas/i386/evex-wig1.d @@ -27,6 +27,10 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 62 f1 ff 08 78 c0 vcvttsd2usi %xmm0,%eax [ ]*[a-f0-9]+: 62 f3 fd 08 17 c0 00 vextractps \$0x0,%xmm0,%eax [ ]*[a-f0-9]+: 62 f3 fd 08 17 40 01 00 vextractps \$0x0,%xmm0,0x4\(%eax\) +[ ]*[a-f0-9]+: 62 f1 fd 08 6e c0 vmovd %eax,%xmm0 +[ ]*[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 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 |