This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] Fix -fpic
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 04 Nov 2004 12:19:30 +0000
- Subject: Re: [arm] Fix -fpic
- Organization: GNU
- References: <200411032228.34341.paul@codesourcery.com>
On Wed, 2004-11-03 at 22:28, Paul Brook wrote:
> The Arm function prologue code only saves/restores the PIC base register when
> regs_ever_live[PIC_OFFSET_TABLE_REGNUM]. However reloading the pic register
> is conditional on current_function_uses_pic_offset_table. These can have
> different values if all PIC references in a function are eliminated.
>
> The patch below saves uses current_function_uses_pic_offset_table in both
> cases. It may be possible to eliminate this variable altogether, and just use
> live register information. However I don't feel confident enough to make that
> change in stage3.
>
> Tested with cross to arm-none-elf.
> Applied to mainline and csl-arm-branch.
Is this a consequence of recent changes on these branches, or does the
change need back-porting to the 3.4 branch?
R.