x86: correct operand type checks
authorJan Beulich <jbeulich@novell.com>
Fri, 15 Dec 2017 08:14:52 +0000 (09:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Dec 2017 08:14:52 +0000 (09:14 +0100)
Again these look to be typos: No template currently allows for any two
(or all three) of RegXMM, RegYMM, and RegZMM in a single operand. Quite
clearly ! are missing, after the addition of which the checks for the
first and (if present) second operands also fully match up.

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

index 96ceb582a70fab4bfd8259d47ac41847d353652e..3e00c761d0924db73a9455e421e80be93927ba41 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-15  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (match_template): Add missing ! to
+       reg{x,y,z}mm checks in q- and l-suffix handling.
+
 2017-12-15  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (build_modrm_byte): Add missing ! to reg64
index 36e5b1958a302665cceaa4151c7d76c5d6128391..5c71bb69ff6165f93c355d0c15d0550b7c488b62 100644 (file)
@@ -4968,9 +4968,9 @@ match_template (char mnem_suffix)
               && !operand_types[0].bitfield.regymm
               && !operand_types[0].bitfield.regzmm)
              || (!operand_types[t->operands > 1].bitfield.regmmx
-                 && operand_types[t->operands > 1].bitfield.regxmm
-                 && operand_types[t->operands > 1].bitfield.regymm
-                 && operand_types[t->operands > 1].bitfield.regzmm))
+                 && !operand_types[t->operands > 1].bitfield.regxmm
+                 && !operand_types[t->operands > 1].bitfield.regymm
+                 && !operand_types[t->operands > 1].bitfield.regzmm))
          && (t->base_opcode != 0x0fc7
              || t->extension_opcode != 1 /* cmpxchg8b */))
        continue;
@@ -4985,7 +4985,7 @@ match_template (char mnem_suffix)
               && ((!operand_types[0].bitfield.regmmx
                    && !operand_types[0].bitfield.regxmm)
                   || (!operand_types[t->operands > 1].bitfield.regmmx
-                      && operand_types[t->operands > 1].bitfield.regxmm)))
+                      && !operand_types[t->operands > 1].bitfield.regxmm)))
        continue;
 
       /* Do not verify operands when there are none.  */