diff options
author | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2015-04-21 17:40:38 +0300 |
---|---|---|
committer | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2015-04-21 17:42:03 +0300 |
commit | 86097ec44f8794ece572a5344a6dc2e558c6a4b1 (patch) | |
tree | 0f9ac3311e11dac658ed7440ad18e185688a9f77 /binutils-2.25/gold/testsuite/i386_mov_to_lea2.s | |
parent | e1103f940633e91aff9c5e56070acab3b58fe0dc (diff) | |
download | toolchain_binutils-86097ec44f8794ece572a5344a6dc2e558c6a4b1.tar.gz toolchain_binutils-86097ec44f8794ece572a5344a6dc2e558c6a4b1.tar.bz2 toolchain_binutils-86097ec44f8794ece572a5344a6dc2e558c6a4b1.zip |
[2.24, 2.25] Convert mov foo@GOT(%reg), %reg to lea foo@GOTOFF(%reg), %reg
2015-04-01 Ilya Tocar <ilya.tocar@intel.com>
PR gold/17640
* i386.cc (Target_i386::can_convert_mov_to_lea): New.
(Target_i386::Scan::local): Don't create GOT entry, when we
can convert GOT to GOTOFF.
(Target_i386::Scan::global): Ditto.
(Target_i386::Relocate::relocate): Convert mov foo@GOT(%reg), %reg to
lea foo@GOTOFF(%reg), %reg if possible.
* testsuite/Makefile.am (i386_mov_to_lea): New test.
* testsuite/i386_mov_to_lea1.s: New.
* testsuite/i386_mov_to_lea2.s: Ditto.
* testsuite/i386_mov_to_lea3.s: Ditto.
* testsuite/i386_mov_to_lea4.s: Ditto.
* testsuite/i386_mov_to_lea5.s: Ditto.
* testsuite/i386_mov_to_lea.sh: Ditto.
Change-Id: I7916a1da20873600a910ce358990b1fe2c1f9897
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Diffstat (limited to 'binutils-2.25/gold/testsuite/i386_mov_to_lea2.s')
-rw-r--r-- | binutils-2.25/gold/testsuite/i386_mov_to_lea2.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils-2.25/gold/testsuite/i386_mov_to_lea2.s b/binutils-2.25/gold/testsuite/i386_mov_to_lea2.s new file mode 100644 index 00000000..65f1bfd7 --- /dev/null +++ b/binutils-2.25/gold/testsuite/i386_mov_to_lea2.s @@ -0,0 +1,10 @@ + .text + .type foo, @function +foo: + ret + .size foo, .-foo + .globl bar + .type bar, @function +bar: + movl foo@GOT(%ecx), %eax + .size bar, .-bar |