]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86/APX: optimize {nf} forms of ADD/SUB with specific immediates
authorJan Beulich <jbeulich@suse.com>
Fri, 28 Jun 2024 06:18:40 +0000 (08:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 Jun 2024 06:18:40 +0000 (08:18 +0200)
commit0868b8999bbca960781e7d8bbbc363536193a694
treea8ab13e006208fe1ba79ec127b413e67c39a0a35
parentf63d85cc78e73e7df93e6eedc953a08b713cfa43
x86/APX: optimize {nf} forms of ADD/SUB with specific immediates

Unlike for the legacy forms, where there's a difference in the resulting
EFLAGS, for the NF variants we can safely replace ones using 0x80 by the
respectively other insn while negating the immediate, saving 3 immediate
bytes (just 1 though for 16-bit operand size). Similarly we can replace
ones using 1 / -1 by INC/DEC (eliminating the immediate).
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-apx-nf-intel.d
gas/testsuite/gas/i386/x86-64-apx-nf-optimize.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-nf.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