Enable sibcalls on hppa-unknown-linux-gnu

John David Anglin dave@hiauly1.hia.nrc.ca
Thu Oct 3 09:17:00 GMT 2002


> Note that this change is going to conflict with Andreas Bauer's
> change, which Richard Henderson recently applied to the
> gcc-3_4-basic-improvements branch.  CVS won't detect
> the conflict, I think, but nevertheless there is a semantic conflict.

I will look at the branch and try to remove the conflict.

> I'm not quite sure what the best way to fix the conflict is.
> One possible solution would be to change the code in pa32-linux.h
> to #undef TARGET_HAS_STUBS_AND_ELF_SECTIONS.

This has proved to be an over simplification of the situation on
pa32 linux.  The stubs are only a problem if they save the return
pointer in the frame.

My current understanding is that pa64-linux will use the same ABI
as hpux (no stubs and bve interspace return).  However, because
the ABI mandates passing a pointer to the beginning of the memory
portion of the argument list (arg8) in GR 29 (ap) even in calls
with no memory parameter, it appears that sibcalls won't work
because the argument sequence for all calls contains a reference
to the arg pointer.

Maybe the solution to this is to use a different register as
the internal arg pointer and copy GR 29 to it in the function
prologue.  I think this would also facilitate elimination of
the arg pointer.

> I think that should work, provided that pa32-linux.h gets included
> after pa-linux.h.  Is that (a) true and (b) something which it would
> be OK to rely on?

Yes and yes.

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



More information about the Gcc-patches mailing list