]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: allow to request ModR/M encoding
authorJan Beulich <jbeulich@suse.com>
Fri, 24 Feb 2023 13:00:11 +0000 (14:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Feb 2023 13:00:11 +0000 (14:00 +0100)
commitae9a0a51e851eac3cdcd2a6791bf05480211c169
treef648d40b9e9dfa9561d6c7cb261140155cf49f0b
parentcafa5ef72e29d0a203d0c07cbec4e0688c26d1eb
x86: allow to request ModR/M encoding

Several insns have a (typically shorter) non-ModR/M and a (typically
longer) ModR/M encoding. In most cases the former is used by default.
This isn't too dissimilar from register-only insns sometimes having two
encoding forms. In those cases {load} or {store} can be used to control
the encoding used. Extend this to ModR/M-less encodings which have a
ModR/M counterpart (note that BSWAP hasn't). For insn reading and
writing their (explicit) memory operand, both prefixes are honored;
otherwise only the applicable one is.

Note that for some forms of XCHG, {store} has already been performing
this function, apparently as an unnoticed side effect of adding D to
the template.
gas/config/tc-i386.c
gas/testsuite/gas/i386/pseudos.d
gas/testsuite/gas/i386/pseudos.s
gas/testsuite/gas/i386/x86-64-pseudos.d
gas/testsuite/gas/i386/x86-64-pseudos.s