diff options
author | Jan Beulich <jbeulich@suse.com> | 2020-06-09 08:59:04 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2020-06-09 08:59:04 +0200 |
commit | 73239888b37b95101d55d1d58b0acb663496b8d7 (patch) | |
tree | 626fc87c465db6a977b955fb1bebf1ce513eaa48 /gas | |
parent | 18897deb534373660e12511aeabbc1885d942dae (diff) | |
download | gdb-73239888b37b95101d55d1d58b0acb663496b8d7.zip gdb-73239888b37b95101d55d1d58b0acb663496b8d7.tar.gz gdb-73239888b37b95101d55d1d58b0acb663496b8d7.tar.bz2 |
x86: consistently print prefixes explicitly which are invalid with VEX etc
All of data size, rep, lock, and rex prefixes are invalid with VEX- and
alike encoded insns. Make sure they get printed explicitly in all cases,
to signal the anomaly. With this, do away with "rex_ignored" - if there
is a rex prefix, we want to print it anyway for VEX etc (and there's
nothing "ignored" about it in the first place - such an instruction will
raise #UD).
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.s | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 78ffd80..8b78964 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 prefix-with-VEX/EVEX + encoding tests. + * testsuite/gas/i386/prefix.d: Adjust expectations. + +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. diff --git a/gas/testsuite/gas/i386/prefix.d b/gas/testsuite/gas/i386/prefix.d index 9e293bc..02e1813 100644 --- a/gas/testsuite/gas/i386/prefix.d +++ b/gas/testsuite/gas/i386/prefix.d @@ -86,8 +86,11 @@ Disassembly of section .text: [ ]*[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]+: 66 c5 f8 28 c0 data16 vmovaps %xmm0,%xmm0 +[ ]*[a-f0-9]+: f3 c4 e1 78 28 c0 repz vmovaps %xmm0,%xmm0 +[ ]*[a-f0-9]+: f2 c5 f8 28 c0 repnz vmovaps %xmm0,%xmm0 +[ ]*[a-f0-9]+: f0 62 f1 7c 08 28 c0 lock vmovaps %xmm0,%xmm0 [ ]*[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 - ... #pass diff --git a/gas/testsuite/gas/i386/prefix.s b/gas/testsuite/gas/i386/prefix.s index 78fd478..8d563e1 100644 --- a/gas/testsuite/gas/i386/prefix.s +++ b/gas/testsuite/gas/i386/prefix.s @@ -451,6 +451,11 @@ int $3 + .byte 0x66; vmovaps %xmm0, %xmm0 + repz; {vex3} vmovaps %xmm0, %xmm0 + repnz; vmovaps %xmm0, %xmm0 + lock; {evex} vmovaps %xmm0, %xmm0 + vcvtpd2dqx 0x20(%eax),%xmm0 vcvtpd2dq 0x20(%eax){1to2},%xmm0 vcvtpd2dqx 0x20(%eax),%xmm0 |