diff options
author | Jan Beulich <jbeulich@suse.com> | 2020-07-14 10:33:40 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2020-07-14 10:33:40 +0200 |
commit | 7531c61332dbd9061b09312e44b62523547e8225 (patch) | |
tree | b6263d54a1222a908ece3bd2612cd1fbf5dea945 /gas | |
parent | 17d3c7eccd41c5053c0b567eb67fe59808cc748a (diff) | |
download | gdb-7531c61332dbd9061b09312e44b62523547e8225.zip gdb-7531c61332dbd9061b09312e44b62523547e8225.tar.gz gdb-7531c61332dbd9061b09312e44b62523547e8225.tar.bz2 |
x86: simplify decode of opcodes valid with (embedded) 66 prefix only
The only valid (embedded or explicit) prefix being the data size one
(which is a fairly common pattern), avoid going through prefix_table[].
Instead extend the "required prefix" logic to also handle PREFIX_DATA
alone in a table entry, now used to identify this case. This requires
moving the (adjusted) ->prefix_requirement logic ahead of the printing
of stray prefixes, as the latter needs to observe the new setting of
PREFIX_DATA in used_prefixes.
Also add PREFIX_OPCODE on related entries when previously there was
mistakenly no decode step through prefix_table[].
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/prefix.d | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index aead7cd..1bb4605 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2020-07-14 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/prefix.d: Adjust expectations. + +2020-07-14 Jan Beulich <jbeulich@suse.com> + * testsuite/gas/i386/x86-64-avx-intel.d, testsuite/gas/i386/x86-64-sse4_2-intel.d: Adjust expectations. diff --git a/gas/testsuite/gas/i386/prefix.d b/gas/testsuite/gas/i386/prefix.d index 02e1813..58bf8b3 100644 --- a/gas/testsuite/gas/i386/prefix.d +++ b/gas/testsuite/gas/i386/prefix.d @@ -14,9 +14,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 26 9b es fwait [ ]*[a-f0-9]+: 9b fwait [ ]*[a-f0-9]+: 65 c7 05 00 00 00 00 00 00 00 00 movl \$0x0,%gs:0x0 -[ ]*[a-f0-9]+: 66 f2 0f 38 17 data16 \(bad\) -[ ]*[a-f0-9]+: f2 66 0f 54 repnz \(bad\) -[ ]*[a-f0-9]+: f2 0f 54 repnz \(bad\) +[ ]*[a-f0-9]+: 66 f2 0f 38 17 \(bad\) +[ ]*[a-f0-9]+: f2 66 0f 54 \(bad\) +[ ]*[a-f0-9]+: f2 0f 54 \(bad\) [ ]*[a-f0-9]+: f2 66 0f 11 22 data16 movsd %xmm4,\(%edx\) [ ]*[a-f0-9]+: f2 67 66 0f 11 22 data16 movsd %xmm4,\(%bp,%si\) [ ]*[a-f0-9]+: f2 67 f0 66 0f 11 22 lock data16 movsd %xmm4,\(%bp,%si\) @@ -72,7 +72,7 @@ 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]+: f3 0f 28 \(bad\) * [ ]*[a-f0-9]+: ff cc dec %esp [ ]*[a-f0-9]+: c5 fa 28 \(bad\) * [ ]*[a-f0-9]+: ff cc dec %esp |