PATCH: PIC_OFFSET_TABLE_REGNUM_SAVED should be call used when

John David Anglin dave@hiauly1.hia.nrc.ca
Sun Jan 14 20:36:00 GMT 2001


>   > With yesterday's sourceware CVS, hppa64-hpux11-gcc doesn't seem to see any
>   > need to reload r27 for the call to bar.  This problem came to light when I
>   > was investigating how to fix the calls which get pasted into _init (which
>   > also don't reload r27, or r19 in 32 bit case, and so lose if there is more
>   > than one pasted call).
> Fixed registers must appear as call-clobbered (see the GCC documentation);
> failure to do this will result in incorrect code.

I don't fully understand why Alan thinks r27 should be reloaded before calls.
However, with respect to r4 which is used to save and restore r27/r19
depending on ABI, we currently set it to be a fixed register when generating
PIC code.  As you note above, fixed registers must appear as call-clobbered.
This a problem for r4 because according to the ABI it is a caller save
register that should not be call-clobbered.  Thus, my patch is not the correct
solution.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


More information about the Gcc-bugs mailing list