pa reload problem
Alan Modra
alan@linuxcare.com.au
Tue, 5 Dec 2000 16:33:29 +1100 (EST)
On Mon, 4 Dec 2000, John David Anglin wrote:
> > Getting back on topic, the reload problem _does_ affect 32 bit hppa code.
> > Compiling my testcase with -O2 -fPIC -S, gives
> >
> > copy %r19,%r4
> > bl foo,%r2
> > stw %r19,-32(%r30)
> > addil LT'cpu_hz,%r4
> > copy %r1,%r21
> > addil LT'.LC0,%r19 ! oops
>
> For some reason, I only saw this with the 64 bit version.
Probably because it only appears with -fpic (or -fPIC), which you get for
free on pa64
> There is one other bit of code in rtlanal.c related to the patch which
> bothers me. I am wondering if it is ok or needs changing:
>
> #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
> /* ??? When call-clobbered, the value is stable modulo the restore
> that must happen after a call. This currently screws up local-alloc
> into believing that the restore is not needed. */
> if (x == pic_offset_table_rtx)
> return 0;
> #endif
>
> This is in rtx_unstable_p and rtx_varies_p. Possibly, now that there is
> a use until reload is complete, this problem is fixed and the
> pic_offset_table_rtx should be stable even when
> PIC_OFFSET_TABLE_REG_CALL_CLOBBERED? See comment at beginning of
> rtx_varies_p.
Likely so. With rth's latest patch to calculate_global_regs_live, it's
possibile that I can remove some of the ARG_POINTER_INVARIANT patch too.
--
Linuxcare. Support for the Revolution.