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 06:23:44PM -0400, John David Anglin wrote:
> >
> >
> > That is safe according to the ia64 psABI.
>
> Read carefully what 'c' says:
>
> > c. Any procedure call (indirect or direct) may modify gp - unless the call
> > is known to be local to the load module.
>
> This is talking about what happens in a procedure call. It's not talking
> about what happens to gp in the body of a procedure. 'c' and 'd' don't
> guarantee that gp won't be modified when a local call returns. For that,
'c' and 'd' require the compiler guarantees gp won't be modified when
a local call returns since gp will be the same at procedure entry and
exit.
> you need to know if it is valid for a function to make an external
> tail call, what happens to gp in the return path, etc.
Basically, an ia64 psABI conforming compiler should save/restore gp
across an external call no matter if gp is used by caller or not.
H.J.