This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PIC_OFFSET_TABLE_REGNUM_SAVED should be call used when
- To: alan at linuxcare dot com dot au (Alan Modra)
- 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 20:31:12 -0500 (EST)
- Cc: law at redhat dot com, gcc-patches at gcc dot gnu dot org
> > > Oops, there is a problem. The PIC_OFFSET_TABLE_REGNUM_SAVED register
> > > must be call used under all conditions since non PIC code has to be able
> > > to call PIC code.
> >
> > On further thought, the PIC_OFFSET_TABLE_REGNUM_SAVED can't be a call used
> > register since this will break the run-time ABI. I think this means that
> > it can't be a fixed register as well. Need a different solution.
>
> Why will that break the ABI? New code will just assume that r4 isn't
> preserved over calls, but it's no problem if in fact r4 is preserved. It
If we make r4 call used, it isn't saved by the callee. That's how I
noticed that there was a problem in the first place. However, when r4
isn't call used, reload sometimes messes up. I need to go back and look
at why. However, I haven't had much luck with my builds lately.
It seems overkill to have both the caller and callee save r4.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)