Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Jun 2003 15:11:05 -0700
From:      Arun Sharma <arun.sharma@intel.com>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        freebsd-ia64@freebsd.org
Subject:   Re: (FWD) Does gcc violate the ia64 ABI?
Message-ID:  <3EDD1CF9.9050202@intel.com>
In-Reply-To: <20030530180807.GD568@dhcp01.pn.xcllnt.net>
References:  <20030530173827.GD90937@dragon.nuxi.com> <20030530180807.GD568@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EDD1CF9.9050202>