[PATCH] i386: Also check R12-R15 registers when optimizing testq to testb
H.J. Lu
hjl.tools@gmail.com
Thu Dec 12 20:32:00 GMT 2019
Similar to SP, BP, SI and DI registers, R12-R15 registers must use REX
prefix for the low byte register when optimizing
test $imm7, %r64/%r32/%r16 -> test $imm7, %r8
PR gas/25274
* config/tc-i386.c (optimize_encoding): Also check R12-R15
registers for "test $imm7, %r64/%r32/%r16 -> test $imm7, %r8"
optimization.
* testsuite/gas/i386/x86-64-optimize-3.s: Add tests for test
with r12.
* testsuite/gas/i386/x86-64-optimize-3.d: Updated.
* testsuite/gas/i386/x86-64-optimize-3b.d: Likewise.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i386-Also-check-R12-R15-registers-when-optimizing-te.patch
Type: text/x-patch
Size: 4382 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20191212/355fe755/attachment.bin>
More information about the Binutils
mailing list