This is the mail archive of the
mailing list for the GCC project.
Re: RFA: Add an FPIC set of multilibs to the MN10300 port
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, aoliva at redhat dot com, kevinb at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Oct 2008 11:17:53 +0100
- Subject: Re: RFA: Add an FPIC set of multilibs to the MN10300 port
- References: <firstname.lastname@example.org> <48F4BF0A.email@example.com> <49018BD5.firstname.lastname@example.org>
Nick Clifton <email@example.com> writes:
> Hi Jeff,
> > Something doesn't make sense here. a2 is call-saved and thus a
> > function can reasonably expect its value to be preserved across calls
> > -- which ought to apply to PIC code as well.
> > So ISTM that if comp is modifying a2 in a way which is visible to
> > qsort, then the problem would be that a2 isn't being saved/restored
> > within comp.
> > At least that's the way it seems to me and how things work on other
> > ports.
> A fair point. In which case please may I offer an alternative solution?
> The problem it seems to me is that when a register is marked as fixed it
> also has to be marked as call-used. So for the mn103000 marking the a2
> register as fixed in pic mode is wrong because it changes it from
> call-saved to call-used.
Have you tried using CALL_REALLY_USED_REGISTERS? I.e. define
CALL_REALLY_USED_REGISTERS to be the same as CALL_USED_REGISTERS,
except that the former marks a2 as call-saved.