diff options
author | Jan Beulich <jbeulich@suse.com> | 2020-06-09 08:56:39 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2020-06-09 08:56:39 +0200 |
commit | bf926894b63fef2559685909ea2e9f794648a256 (patch) | |
tree | 85f1ff082f3bc576874260a6efc43a79e6e79f82 /gas | |
parent | a5aaedb9dba2775d855fa394246ede08e9f36652 (diff) | |
download | gdb-bf926894b63fef2559685909ea2e9f794648a256.zip gdb-bf926894b63fef2559685909ea2e9f794648a256.tar.gz gdb-bf926894b63fef2559685909ea2e9f794648a256.tar.bz2 |
x86: correct decoding of packed-FP-only AVX encodings
Various AVX insns utilizing the X macro fail to reject F3/F2 embedded
prefix encodings. As the PREFIX_OPCODE attribute wasn't used by any
non-legacy-encoded insns so far, re-use it to achieve the intended
effect.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.s | 60 |
3 files changed, 80 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b4476bf..78ffd80 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2020-06-09 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/prefix.s: Add bogus REP / EVEX.W prefix + with VEX/EVEX encoding tests. + * testsuite/gas/i386/prefix.d: Adjust expectations. + +2020-06-09 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (process_suffix): Restrict defaulting to 'q' suffix. * testsuite/gas/i386/noreg64.s: Add lcall/ljmp cases. diff --git a/gas/testsuite/gas/i386/prefix.d b/gas/testsuite/gas/i386/prefix.d index e9ad5eb..9e293bc 100644 --- a/gas/testsuite/gas/i386/prefix.d +++ b/gas/testsuite/gas/i386/prefix.d @@ -72,6 +72,20 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: f2 0f c7 \(bad\) [ ]*[a-f0-9]+: f0 90 lock nop +[ ]*[a-f0-9]+: f3 0f 28 repz \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp +[ ]*[a-f0-9]+: c5 fa 28 \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp +[ ]*[a-f0-9]+: c4 e1 7b 28 \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp +[ ]*[a-f0-9]+: 62 f1 fc 08 28 \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp +[ ]*[a-f0-9]+: 62 f1 7e 08 28 \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp +[ ]*[a-f0-9]+: 62 f1 7d 08 28 \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp +[ ]*[a-f0-9]+: 62 f1 ff 08 28 \(bad\) * +[ ]*[a-f0-9]+: ff cc dec %esp [ ]*[a-f0-9]+: c5 fb e6 40 20 vcvtpd2dqx 0x20\(%eax\),%xmm0 [ ]*[a-f0-9]+: 62 f1 ff 18 e6 40 04 vcvtpd2dq 0x20\(%eax\)\{1to2\},%xmm0 [ ]*[a-f0-9]+: c5 fb e6 40 20 vcvtpd2dqx 0x20\(%eax\),%xmm0 diff --git a/gas/testsuite/gas/i386/prefix.s b/gas/testsuite/gas/i386/prefix.s index a4c60a7..78fd478 100644 --- a/gas/testsuite/gas/i386/prefix.s +++ b/gas/testsuite/gas/i386/prefix.s @@ -391,6 +391,66 @@ nop + repz; movaps %xmm7, %xmm7 + int $3 + +# "repz" vmovaps %xmm7, %xmm7 + .byte 0xc5 + .byte 0xfa + .byte 0x28 + .byte 0xff + + int $3 + +# "repnz" {vex3} vmovaps %xmm7, %xmm7 + .byte 0xc4 + .byte 0xe1 + .byte 0x7b + .byte 0x28 + .byte 0xff + + int $3 + +# "EVEX.W1" vmovaps %xmm7, %xmm7 + .byte 0x62 + .byte 0xf1 + .byte 0xfc + .byte 0x08 + .byte 0x28 + .byte 0xff + + int $3 + +# "repz" vmovaps %xmm7, %xmm7 + .byte 0x62 + .byte 0xf1 + .byte 0x7e + .byte 0x08 + .byte 0x28 + .byte 0xff + + int $3 + +# "EVEX.W0" vmovapd %xmm7, %xmm7 + .byte 0x62 + .byte 0xf1 + .byte 0x7d + .byte 0x08 + .byte 0x28 + .byte 0xff + + int $3 + +# "repnz" vmovapd %xmm7, %xmm7 + .byte 0x62 + .byte 0xf1 + .byte 0xff + .byte 0x08 + .byte 0x28 + .byte 0xff + + int $3 + vcvtpd2dqx 0x20(%eax),%xmm0 vcvtpd2dq 0x20(%eax){1to2},%xmm0 vcvtpd2dqx 0x20(%eax),%xmm0 |