From c4fc4724a6afd605692b24c0af24c7e234dc5ace Mon Sep 17 00:00:00 2001 From: Ilya Tocar Date: Wed, 1 Apr 2015 16:48:38 +0300 Subject: Convert mov foo@GOT(%reg), %reg to lea foo@GOTOFF(%reg), %reg 2015-04-01 Ilya Tocar 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. --- gold/ChangeLog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gold/ChangeLog') diff --git a/gold/ChangeLog b/gold/ChangeLog index be6eb9f..6a84355 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,20 @@ +2015-04-01 Ilya Tocar + + 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. + 2015-04-01 H.J. Lu * Makefile.am (ZLIB): New. -- cgit v1.1