From: Jan Beulich Date: Fri, 16 May 2025 08:31:35 +0000 (+0200) Subject: x86: move Anysize check in operand_size_match() X-Git-Tag: binutils-2_45~573 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7148a799b2a4c7e2be56b21f6d01018a6b27895;p=thirdparty%2Fbinutils-gdb.git x86: move Anysize check in operand_size_match() Anysize is applicable to memory operands only. Move the check to where memory operands are handled. (The RegSIMD part there was questionable altogether.) --- diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 69b56774531..ffde87aef53 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -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;