mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
1fa29f1060
2015-04-06 Ilya Tocar <ilya.tocar@intel.com> PR gold/17641 * x86_64.cc (Target_x86_64::can_convert_mov_to_lea): New. (Target_x86_64::Scan::local): Don't create GOT entry, when we can convert mov to lea. (Target_x86_64::Scan::global): Ditto. (Target_x86_64::Relocate::relocate): Convert mov foo@GOTPCREL(%rip), %reg to lea foo(%rip), %reg if possible. * testsuite/Makefile.am (x86_64_mov_to_lea): New test. * testsuite/x86_64_mov_to_lea1.s: New. * testsuite/x86_64_mov_to_lea2.s: Ditto. * testsuite/x86_64_mov_to_lea3.s: Ditto. * testsuite/x86_64_mov_to_lea4.s: Ditto. * testsuite/x86_64_mov_to_lea.sh: Ditto. ---
13 lines
185 B
ArmAsm
13 lines
185 B
ArmAsm
.text
|
|
.globl foo
|
|
.hidden foo
|
|
.type foo, @function
|
|
foo:
|
|
ret
|
|
.size foo, .-foo
|
|
.globl _start
|
|
.type _start, @function
|
|
_start:
|
|
movq foo@GOTPCREL(%rip), %rax
|
|
.size _start, .-_start
|