[binutils-gdb] x86: simplify one case of base opcode setting in optimize_encoding()

Jan Beulich via Binutils-cvs <[email protected]> Fri, 24 Jul 2026 06:25:52 +0000 (GMT)
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dcf64f1ae2ca3=
6d81a90e49066004260f9cda0cb7

commit cf64f1ae2ca36d81a90e49066004260f9cda0cb7
Author: Jan Beulich <[email protected]>
Date:   Fri Jul 24 08:23:44 2026 +0200

    x86: simplify one case of base opcode setting in optimize_encoding()
   =20
    The W property is evaluated only later, so the base opcode can still be
    the value found in the corresponding insn template.

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

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 2853f0c76e7..dd6d4381087 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5461,7 +5461,7 @@ optimize_encoding (void)
 	   andl %rN, %rN  -> testl %rN, %rN
 	   orl %rN, %rN   -> testl %rN, %rN
        */
-      i.tm.base_opcode =3D 0x84 | (i.tm.base_opcode & 1);
+      i.tm.base_opcode =3D 0x84;
     }
   else if (!optimize_for_space
 	   && i.tm.base_opcode =3D=3D 0xd0