This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: arm.md sibcall patterns


> 
> > It is true.  The link register is live, since it must be valid
> > when transferring to the target function.
> 
> Hmmm, you're right about that.  But, it means the only difference
> between a call pattern and a sibcall pattern is that one clobbers lr,
> and the other uses it.  Is that risky?  It's at least confusing.
> Should we add the (return)s to the sibcalls anyway, just in case?
> Perhaps it's pointless, but IMHO it's more accurate.

I put the use of the link register into the sibcall patterns because gcc 
was generating normal call instructions that were missing the clobber and 
then mis-matching against the sibcall pattern.  Unfortunately it was a bad 
move, since now gcc considers the link register to be live in the function 
even when it's only use is to pass to the sibcall; so we now end up saving 
and then restoring lr for no purpose.  I'm not sure how best to fix this 
problem.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]