x86: fix CMPXCHG8B special case when disallowing q suffix outside of 64-bit mode

In match_template() i.tm hasn't been filled yet, so it is necessarily t
which needs checking. This is only a latent issue as no other templates
with the same base_opcode have an extension_opcode of 1.
This commit is contained in:
Jan Beulich 2021-03-25 08:20:55 +01:00
parent 596a02ff55
commit 5e74b4959b
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2021-03-25 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (match_template): Use t instead of i.tm.
2021-03-25 Jan Beulich <jbeulich@suse.com>
* testsuite/gas/i386/avx512f-nondef.s: Add vgather cases.

View File

@ -6290,7 +6290,7 @@ match_template (char mnem_suffix)
if (((i.suffix == QWORD_MNEM_SUFFIX
&& flag_code != CODE_64BIT
&& !(t->base_opcode == 0xfc7
&& i.tm.opcode_modifier.opcodeprefix == PREFIX_NONE
&& t->opcode_modifier.opcodeprefix == PREFIX_NONE
&& t->extension_opcode == 1) /* cmpxchg8b */)
|| (i.suffix == LONG_MNEM_SUFFIX
&& !cpu_arch_flags.bitfield.cpui386))