This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/43129] Simplify global variable's address loading with option -fpic
- From: "stephen.clarke at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Oct 2010 16:33:29 +0000
- Subject: [Bug target/43129] Simplify global variable's address loading with option -fpic
- Auto-submitted: auto-generated
- References: <bug-43129-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129
Stephen Clarke <stephen.clarke at st dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stephen.clarke at st dot
| |com
--- Comment #8 from Stephen Clarke <stephen.clarke at st dot com> 2010-10-14 16:32:56 UTC ---
For arm instruction set, could you fold pc into the indexing
to save an instruction?
foo:
ldr r3, .L2 // C
.LPIC0:
ldr r3, [r3,pc] // C
@ sp needed for prologue
ldr r2, [r3]
str r0, [r3]
mov r0, r2
bx lr
.L3:
.align 2
.L2:
.word ABS_ADDRESS_OF_GOT_ENTRY_FOR_i -(.LPIC0+4) // C