]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: various operations on mask registers can avoid going through mod_table[]
authorJan Beulich <jbeulich@suse.com>
Tue, 11 Jul 2023 06:21:03 +0000 (08:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Jul 2023 06:21:03 +0000 (08:21 +0200)
commit2bd8129f96ba59cae00f0da5266254ef34d20f82
tree3fa92f443be8bc42b08949fae651904ad406274e
parent2ad525c286bfd1e9a3a654c37d689afdbcb2f7d5
x86: various operations on mask registers can avoid going through mod_table[]

Now that we have OP_R(), use it here as well, while wiring memory-only
operands to OP_M() at the same time. To keep the number of consumed
opcode bytes similar to before, make BadOp() also account for VEX/XOP/
EVEX prefix bytes. To keep that change simple, convert need_vex to an
actual count of prefix bytes (keeping intact all prior boolean uses of
the field).

Note how this improves disassembly of such bad encodings, by at least
leaving a hint towards what a "nearby" instruction is. (For KSHIFT*
change the immediates test testcases use, such that disassembly remains
sufficiently in sync.)

While there also use Ux for VPMOV{B,W,D,Q}2M, where decoding through
mod_table[] was missing in the earlier scheme.
gas/testsuite/gas/i386/disassem.d
gas/testsuite/gas/i386/disassem.s
gas/testsuite/gas/i386/x86-64-disassem.d
gas/testsuite/gas/i386/x86-64-disassem.s
opcodes/i386-dis-evex-mod.h
opcodes/i386-dis-evex-prefix.h
opcodes/i386-dis-evex-w.h
opcodes/i386-dis.c