]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86/APX: optimize certain {nf}-form insns to LEA
authorJan Beulich <jbeulich@suse.com>
Fri, 28 Jun 2024 06:19:59 +0000 (08:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 Jun 2024 06:19:59 +0000 (08:19 +0200)
commit27ef4876f74717e750102f9273f143bf45541a46
tree18a018f6bb44caeb8b9cb48ea61572ef04279c74
parentc7eae03eab750f93b6460e883f25b71d46dd1c47
x86/APX: optimize certain {nf}-form insns to LEA

..., as that leaves EFLAGS untouched anyway. That's a shorter encoding,
available as long as certain constraints on operand size and registers
are met; see code comments.

Note that this requires deferring to derive encoding_evex from {nf}
presence, as in optimize_encoding() we want to avoid touching the insns
when {evex} was also used.

Note further that this requires want_disp32() to now also consider the
opcode: We don't want to replace i.tm.mnem_off, for diagnostics to still
report the original mnemonic (or else things can get confusing). While
there, correct adjacent mis-indentation.
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-apx-nf-optimize-size.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-nf-optimize.d
gas/testsuite/gas/i386/x86-64-apx-nf.s
gas/testsuite/gas/i386/x86-64.exp
opcodes/i386-opc.tbl
opcodes/i386-tbl.h