This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pa reload problem
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: pa reload problem
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Mon, 4 Dec 2000 14:15:49 +1100 (EST)
- cc: gcc-patches at gcc dot gnu dot org
On Sat, 2 Dec 2000, Richard Henderson wrote:
> In any case, the patch is applied in the wrong place. It
> needs to happen in calculate_global_regs_live, near
>
> /* Force the stack pointer to be live -- which might not already be
> the case for blocks within infinite loops. */
> SET_REGNO_REG_SET (new_live_at_end, STACK_POINTER_REGNUM);
OK. How about this then?
* flow.c (calculate_global_regs_live): Set the pic register live too.
--
Linuxcare. Support for the Revolution.
Index: gcc/flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.355
diff -u -p -r1.355 flow.c
--- flow.c 2000/11/30 21:40:32 1.355
+++ flow.c 2000/12/04 00:38:41
@@ -3376,7 +3376,17 @@ calculate_global_regs_live (blocks_in, b
to any pseudo before reload is a potential reference of the
frame pointer. */
if (! reload_completed)
- SET_REGNO_REG_SET (new_live_at_end, FRAME_POINTER_REGNUM);
+ {
+ SET_REGNO_REG_SET (new_live_at_end, FRAME_POINTER_REGNUM);
+#ifdef PIC_OFFSET_TABLE_REGNUM
+ /* And also for the pic register. References to constants
+ may require reloading via the pic register. Assume the
+ pic register is not in use, or will be handled by other
+ means, if it is not fixed. */
+ if (fixed_regs[PIC_OFFSET_TABLE_REGNUM])
+ SET_REGNO_REG_SET (new_live_at_end, PIC_OFFSET_TABLE_REGNUM);
+#endif
+ }
/* Regs used in phi nodes are not included in
global_live_at_start, since they are live only along a