[binutils-gdb] x86: drop bogus accumulator check

Jan Beulich jbeulich@sourceware.org
Fri May 16 08:30:49 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=90a3386308e323b59eaad646f07b2c2a8ed036d4

commit 90a3386308e323b59eaad646f07b2c2a8ed036d4
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri May 16 10:25:38 2025 +0200

    x86: drop bogus accumulator check
    
    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".

Diff:
---
 gas/config/tc-i386.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 3e7040a3314..9671c642178 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2518,7 +2518,6 @@ match_operand_size (const insn_template *t, unsigned int wanted,
 		   || (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-cvs mailing list