This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PIC_OFFSET_TABLE_SAVE_RTX in large stack frame
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: PIC_OFFSET_TABLE_SAVE_RTX in large stack frame
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Fri, 26 Jan 2001 10:36:34 +1100 (EST)
- cc: law at redhat dot com, gcc-patches at gcc dot gnu dot org
On Thu, 25 Jan 2001, John David Anglin wrote:
> > Here's a fix for a complication I found when compiling glibc. I suspect
> > Dave's patch to move this code into pa.md requires something similar.
> >
> > * config/pa/pa.c (hppa_expand_prologue): Handle saves of pic
> > register into the stack when offset from base is greater than 8k.
>
> Yuck!
Agreed.
> I don't think this is optimal. In most cases, the pic offset
> register is already saved to the frame (maybe we want to track this).
> I would prefer that we change pa_init_machine_status to grab r4 to
> save the pic offset table register (see below). I'll have to try it
> though to make sure it's safe.
I disagree. By forcing PIC_OFFSET_TABLE_SAVE_RTX to a register, you are
circumventing gcc's normal register allocation heuristics. It may be much
better to use r4 for general use.
> Another approach would be to use emit_move_sequence.
OK, that might be cleaner.
--
Linuxcare. Support for the Revolution.