This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PIC_OFFSET_TABLE_SAVE_RTX in large stack frame


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]