ix86: don't recognize/derive Q suffix in the common case
authorJan Beulich <jbeulich@suse.com>
Mon, 12 Dec 2022 12:52:15 +0000 (13:52 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 12 Dec 2022 12:52:15 +0000 (13:52 +0100)
commit9db83a32776e946ab9738dd5a2bd3a4018641feb
tree5a432e5ca8b36e33189b77922a561fa8f3acb8c1
parent04784e33fabb45c4de7a901587f468d4bc169649
ix86: don't recognize/derive Q suffix in the common case

Have its use, except where actually legitimate, result in the same "only
supported in 64-bit mode" diagnostic as emitted for other 64-bit only
insns. Also suppress deriving of the suffix in Intel mode except in the
legitimate cases. This in exchange allows dropping the respective code
from match_template().

To maintain reasonable diagnostics (in particular to avoid "`mov' is
only supported in 64-bit mode" on the SIMD forms of MOVQ) we need to
defer parse_insn()'s emitting of errors unrelated to prefix parsing.
Utilize i.error just like match_template() does.

Oddly enough despite gcc's preference towards FILDQ and FIST{,T}Q we
had no testcase whatsoever for these. Therefore such tests are being
added. Note that the removed line in the x86-64-lfence-load testcase
was redundant with the exact same one a few lines up.
14 files changed:
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
gas/testsuite/gas/i386/opcode-intel.d
gas/testsuite/gas/i386/opcode-suffix.d
gas/testsuite/gas/i386/opcode.d
gas/testsuite/gas/i386/opcode.s
gas/testsuite/gas/i386/sse3-intel.d
gas/testsuite/gas/i386/sse3.d
gas/testsuite/gas/i386/sse3.s
gas/testsuite/gas/i386/x86-64-lfence-load.d
gas/testsuite/gas/i386/x86-64-lfence-load.s
gas/testsuite/gas/i386/x86-64-sse3-intel.d
gas/testsuite/gas/i386/x86-64-sse3.d
gas/testsuite/gas/i386/x86-64-sse3.s