[PATCH 1/3] x86: consistently convert to byte registers for TEST w/ imm optimization
Commit ac0ab1842d ("i386: Also check R12-R15 registers when optimizing
testq to testb") didn't go quite far enough: In order to avoid confusing
other code registers would better be converted to byte ones uniformly.
Checking just the base opcode without also checking this isn't a VEX
encoding, and without there being other insn properties avoiding a match
once respective VEX/XOP/EXEX-encoded insns would appear, add respective
checks. At the same time there's no real need to check the extension
opcode to be None for the 0xA8 form - there's nothing it can be confused
with, and non-VEX-and-alike forms also won't appear.
On Mon, Dec 16, 2019 at 2:01 AM Jan Beulich <[hidden email]> wrote:
> 1: consistently convert to byte registers for TEST w/ imm optimization
> 2: assert sane internal state for REX conversions
> 3: refine when to trigger optimizations