This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Does gcc violate the ia64 ABI?
On Sat, May 17, 2003 at 04:59:28PM -0700, Richard Henderson wrote:
>
> > BTW, Clause 'd' is in my Sept. 2000 copy of the runtime guide. It may
> > have been there for a long time. We must have missed it somehow.
>
> Hardly conclusive. We need to go back to at least 1998
> to know if someone changed the ABI out from under us.
>
March 15, 1999, version 2.4E has the same wording. Oct. 10, 1997,
version 2.3E says
---
The gp value is always valid on entry to a procedure, and must be
valid at any procedure call. At procedure exit, the gp register
must contain either the procedure own gp, or a valid gp value
remaining from a call. In other words, this register should be
treated as a scratch register across calls (that is, a call may
destroy the register), but it must be preserved and restored prior
to procedure exit if used for any purpose other than holding the gp
value. (See the rationale in Section 5.8.)
...
5.8 Rationale
...
The gp register must be preserved by the procedure from entry to exit.
At procedure return, gp must be valid (for the returning procedure).
This allows the compiler to optimize calls known to be local.
---
H.J.