[PATCH 3/3] x86: simplify one case of base opcode setting in optimize_encoding()
Jan Beulich <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
The W property is evaluated only later, so the base opcode can still be
the value found in the corresponding insn template.
---
There are two checks for opcode 0xc7 earlier in the function. Those
could be simplified, too, but only when additionally adjusting LEA
handling near the top of the function. Whether that would be worth it is
unclear.
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5458,7 +5458,7 @@ optimize_encoding (void)
andl %rN, %rN -> testl %rN, %rN
orl %rN, %rN -> testl %rN, %rN
*/
- i.tm.base_opcode = 0x84 | (i.tm.base_opcode & 1);
+ i.tm.base_opcode = 0x84;
}
else if (!optimize_for_space
&& i.tm.base_opcode == 0xd0