diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-04-26 10:37:30 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-04-26 10:37:30 +0200 |
commit | fe134c656991cda74ab7bad80947930f666f8907 (patch) | |
tree | eca41b24b1d7416e13375c9dc9685b1ebf5b5a4e /opcodes/i386-tbl.h | |
parent | b818855549013ba43e730e07f790e5cbfd16a757 (diff) | |
download | fsf-binutils-gdb-fe134c656991cda74ab7bad80947930f666f8907.zip fsf-binutils-gdb-fe134c656991cda74ab7bad80947930f666f8907.tar.gz fsf-binutils-gdb-fe134c656991cda74ab7bad80947930f666f8907.tar.bz2 |
x86: optimize LEA
Over the years I've seen a number of instances where people used
lea (%reg1), %reg2
or
lea symbol, %reg
despite the same thing being expressable via MOV. Since additionally
LEA often has restrictions towards the ports it can be issued to, while
MOV typically gets dealt with simply by register renaming, transform to
MOV when possible (without growing opcode size and without altering
involved relocation types).
Note that for Mach-O the new 64-bit testcases would fail (for
BFD_RELOC_X86_64_32S not having a representation), and hence get skipped
there.
Diffstat (limited to 'opcodes/i386-tbl.h')
-rw-r--r-- | opcodes/i386-tbl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h index d2ca247..df139ba 100644 --- a/opcodes/i386-tbl.h +++ b/opcodes/i386-tbl.h @@ -1121,7 +1121,7 @@ const insn_template i386_optab[] = { "lea", 0x8d, None, 2, { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |