x86: operand sizing prefixes can disambiguate insns
authorJan Beulich <jbeulich@suse.com>
Thu, 25 Jun 2020 07:29:29 +0000 (09:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Jun 2020 07:29:29 +0000 (09:29 +0200)
commit8bbb3ad806d19ab3f85052220440af46fbd2b81f
tree040003b72def422825a87bdb7c843c1795f90a34
parent589958d6ff391321f081228368ec6096bfad0e09
x86: operand sizing prefixes can disambiguate insns

Use of an explicit data size or REX.W prefix is sufficient indication of
the intended operation when operand size can't be derived from suffix or
register operands. Avoid the ambiguity warning and make in particular
immediate handling (sizing) cope with explicitly specified prefixes.

Extending/reusing the noreg16 test made me notice a few cases of
unintentional 32-bit addressing, which gets corrected at the same time.
13 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/noreg16-data32.d [new file with mode: 0644]
gas/testsuite/gas/i386/noreg16.d
gas/testsuite/gas/i386/noreg16.s
gas/testsuite/gas/i386/noreg32-data16.d [new file with mode: 0644]
gas/testsuite/gas/i386/noreg32-data16.e [new file with mode: 0644]
gas/testsuite/gas/i386/noreg32.s
gas/testsuite/gas/i386/noreg64-data16.d [new file with mode: 0644]
gas/testsuite/gas/i386/noreg64-data16.e [new file with mode: 0644]
gas/testsuite/gas/i386/noreg64-rex64.d [new file with mode: 0644]
gas/testsuite/gas/i386/noreg64.s