]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
X86: Remove "i.rex" to eliminate extra conditional branch
authorCui, Lili <lili.cui@intel.com>
Wed, 22 May 2024 06:38:32 +0000 (14:38 +0800)
committerCui, Lili <lili.cui@intel.com>
Wed, 22 May 2024 07:26:34 +0000 (15:26 +0800)
Resulting code will do better without the extra conditional branch.
Remove "i.rex" to eliminate extra conditional branch.

gas/ChangeLog:

        * config/tc-i386.c (establish_rex): Remove i.rex.

gas/config/tc-i386.c

index dc6d8bb939821aa36c6041d4a574cd1707bc4adb..cb3d464e97ae43baa87b7dfcd7335eaa6ee0e889 100644 (file)
@@ -4308,7 +4308,7 @@ static void establish_rex (void)
        && (i.op[first].regs->reg_flags & RegRex64) != 0)
        || (i.types[last].bitfield.class == Reg && i.types[last].bitfield.byte
           && (i.op[last].regs->reg_flags & RegRex64) != 0))
-      && !i.rex && !is_apx_rex2_encoding () && !is_any_vex_encoding (&i.tm))
+      && !is_apx_rex2_encoding () && !is_any_vex_encoding (&i.tm))
     i.rex |= REX_OPCODE;
 
   /* For REX/REX2/EVEX prefix instructions, we need to convert old registers