x86: fix CMPXCHG8B special case when disallowing q suffix outside of 64-bit mode
authorJan Beulich <jbeulich@suse.com>
Thu, 25 Mar 2021 07:20:55 +0000 (08:20 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Mar 2021 07:20:55 +0000 (08:20 +0100)
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.

gas/ChangeLog
gas/config/tc-i386.c

index 1b9c1fb21c8c0d672498e7cae2890da6a45fa6a9..a54056667f1e405154c6891449898738d036dbaf 100644 (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.
index 785d0c424c6122a60a7e56e61e62ac566689b638..a2ba8d839e713fa3668a260b11242f2058ed5cc5 100644 (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))