gcc.dg/funcorder.c failure on pa64 - need advice

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Apr 16 22:54:00 GMT 2004


> > Now, I suppose Zack is going to ask about the sibcall failures on hppa64 ;)
> 
> I wasn't planning to look at those till after the release, but if you
> know what's going on there I would be delighted to know.

The problem is caused by the fact that the arg pointer is not a
fixed register.  It also can't be eliminated because its offset
varies from call to call.  When the arg pointer isn't fixed
function.c copies it to a temporary rtx.  Sibcalls are not done
when this occurs.  Thus, the failures.

There is a PR related to a problem in taking the address of the
first stack argument.  There is a mixup between using the original
arg pointer register and the copy.  GCC is using the original
after it has been clobbered ;(

I posted a patch a year or so ago to fix the sibcall problem.  It
involved copying the incoming arg pointer to a fixed register.
In order to avoid unnecessary copies, reload has to track whether
the new fixed arg pointer is ever alive or not.  I had a fix to
reload to allowing doing that, but Richard didn't like it much.

There are issues with sibcalls and GNU ld.  A simple unconditional
branch doesn't go very far and GNU ld only provides one long branch
stub table.  In large code, sibcalls can't reach the stub table.
HP ld provides multiple stub tables and the problem isn't as
severe.

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



More information about the Gcc mailing list