]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: move Anysize check in operand_size_match()
authorJan Beulich <jbeulich@suse.com>
Fri, 16 May 2025 08:31:35 +0000 (10:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 16 May 2025 08:31:35 +0000 (10:31 +0200)
Anysize is applicable to memory operands only. Move the check to where
memory operands are handled. (The RegSIMD part there was questionable
altogether.)

gas/config/tc-i386.c

index 69b567745318a421de120b426422f1878eb66596..ffde87aef53f753a771845950b896a4821d3f45d 100644 (file)
@@ -2604,11 +2604,6 @@ operand_size_match (const insn_template *t)
          break;
        }
 
-      if (i.types[j].bitfield.class != Reg
-         && i.types[j].bitfield.class != RegSIMD
-         && t->opcode_modifier.operandconstraint == ANY_SIZE)
-       continue;
-
       if (i.types[j].bitfield.class == Reg
          && (t->operand_types[j].bitfield.class == Reg
              || (t->operand_types[j].bitfield.instance == Accum
@@ -2636,6 +2631,7 @@ operand_size_match (const insn_template *t)
 
       if ((i.flags[j] & Operand_Mem)
          && operand_type_check (t->operand_types[j], anymem)
+         && t->opcode_modifier.operandconstraint != ANY_SIZE
          && !match_mem_size (t, j, j))
        {
          match = 0;