This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PIC_OFFSET_TABLE_REGNUM_SAVED should be call used when
- To: law at redhat dot com
- Subject: Re: PATCH: PIC_OFFSET_TABLE_REGNUM_SAVED should be call used when
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sun, 14 Jan 2001 23:36:33 -0500 (EST)
- Cc: alan at linuxcare dot com dot au, gcc-bugs at gcc dot gnu dot org
> > 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)