This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to make gcc psABI conformant


On Wed, Oct 10, 2007 at 07:42:49AM -0400, Daniel Jacobowitz wrote:
> On Tue, Oct 09, 2007 at 08:44:52PM -0700, H.J. Lu wrote:
> > There are STACK_BOUNDARY and PREFERRED_STACK_BOUNDARY. But they
> > don't provide psABI conformance. A psABI specifies a minimum
> > alignment for incoming stack. Unless a function is local to
> > translation unit, we can only assume the minimum alignment for
> > incoming stack. I think we need a new macro, INCOMING_STACK_BOUNDARY.
> > which can be PREFERRED_STACK_BOUNDARY only if all callers of the
> > function is local to translation unit.
> 
> Isn't that STACK_BOUNDARY?  If not, since you seem to understand the
> difference between these variables, could you improve the
> documentation?

STACK_BOUNDARY is enforced by hardware. INCOMING_STACK_BOUNDARY is
specified by psABI. INCOMING_STACK_BOUNDARY >= STACK_BOUNDARY.

> 
> I'd like to reuse whatever solution you find for this for
> powerpc-linux -maltivec.

The generated code should look similar to what icc generates:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28074

That is we save the original stack pointer in the frame pointer and
align the stack in prologue. It will touch frondend, middleend and
backend. Will this scheme work for PowerPC?

I opened a mete bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33721


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]