This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: arm.md sibcall patterns
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: arm.md sibcall patterns
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Tue, 13 Feb 2001 14:50:22 +0000
- cc: rth at redhat dot com, gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: Richard dot Earnshaw at arm dot com
>
> > 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.