[PATCH 1/6] x86: drop bogus accumulator check

Jan Beulich jbeulich@suse.com
Wed Apr 30 13:29:42 GMT 2025


Accum is an "instance", not a "class". With present enumerator values of
Reg and Accum, the 2nd check simply did the same as the first. In fact
checking for the accumulator (%rax) isn't necessary here at all, because
there's no case where an individual template would permit alternatively
a memory operand or the (qword) accumulator; only "any GPR" is ever
being paired with "memory".

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2518,7 +2518,6 @@ match_operand_size (const insn_template
 		   || (intel_syntax
 		       && flag_code != CODE_64BIT
 		       && (t->operand_types[wanted].bitfield.class == Reg
-			   || t->operand_types[wanted].bitfield.class == Accum
 			   || t->opcode_modifier.isstring))))
 	   || (i.types[given].bitfield.tbyte
 	       && !t->operand_types[wanted].bitfield.tbyte));



More information about the Binutils mailing list