]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86/Intel: restrict suffix derivation
authorJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2022 08:12:45 +0000 (10:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2022 08:12:45 +0000 (10:12 +0200)
commit1cb0ab18ad24ddcedc57b40901153c36e97d6e2e
treebc0e0caa28c9d5229766fee3ee71fdc840d463cd
parentc4a7e6b56218e1d5a858682186b542e2eae01a4a
x86/Intel: restrict suffix derivation

While in some cases deriving an AT&T-style suffix from an Intel syntax
memory operand size specifier is necessary, in many cases this is not
only pointless, but has led to the introduction of various workarounds:
Excessive use of IgnoreSize and NoRex64 as well as the ToDword and
ToQword attributes. Suppress suffix derivation when we can clearly tell
that the memory operand's size isn't going to be needed to infer the
possible need for the low byte/word opcode bit or an operand size prefix
(0x66 or REX.W).

As a result ToDword and ToQword can be dropped entirely, plus a fair
number of IgnoreSize and NoRex64 can also be got rid of. Note that
IgnoreSize needs to remain on legacy encoded SIMD insns with GPR
operand, to avoid emitting an operand size prefix in 16-bit mode. (Since
16-bit code using SIMD insns isn't well tested, clone an existing
testcase just enough to cover a few insns which are potentially
problematic but are being touched here.)

Note that while folding the VCVT{,T}S{S,D}2SI templates, VCVT{,T}SH2SI
isn't included there. This is to fulfill the request of not allowing L
and Q suffixes there, despite the inconsistency with VCVT{,T}S{S,D}2SI.
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/simd.s
gas/testsuite/gas/i386/simd16.d [new file with mode: 0644]
gas/testsuite/gas/i386/simd16.s [new file with mode: 0644]
opcodes/i386-gen.c
opcodes/i386-opc.h
opcodes/i386-opc.tbl
opcodes/i386-tbl.h