(FWD) Does gcc violate the ia64 ABI?

Arun Sharma arun.sharma at intel.com
Tue Jun 3 15:11:25 PDT 2003


Marcel Moolenaar wrote:

>>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91056
 >
> I don't think gcc violates the runtime. There's no requirement to
> save and restore gp in a function if that function does not need
> or use gp itself. Suppose we have the following call-graph:
> 
> 	foo->bar->baz
> 
> foo() cannot assume that when bar() returns, gp has the value that
> corresponds to bar(). 

If foo and bar are in the same load module, then an ia64 ABI compliant 
compiler might want to optimize the call, by not restoring the gp, 
because the ABI guarantees that the gp is valid for bar (and hence valid 
for foo), on exit from bar.

If most of your call/return sequences are local, that's a win.

	-Arun



More information about the freebsd-ia64 mailing list