On Tue, 2015-04-14 at 10:08 -0700, H.J. Lu wrote:

> We have done just that in GCC 4.4 to implement dynamic stack
> alignment on x86 :-).  Some of x86 backend changes for dynamic
> stack alignment are x86 psABI specific.  Others are historical,
> like -mstackrealign. which was the old attempt for dynamic stack
> alignment.

I am a bit confused about the history of stack alignment on x86.  So I
guess -mpreferred-stack-boundary=X came first and is not
obsolete/depreciated. But I thought -mstackrealign=X was the current
method of aligning the stack, but based on this comment and the patches
you pointed me at I guess this is also obsolete (or at least deprecated)
and that -mincoming-stack-boundary=X is the current option that should
be used.  But I am not sure how this option works.

Obviously it tells GCC what assumption to make about stack alignment at
the start of a function but how do you tell GCC what alignment you want
for the function?  Or does GCC figure that out for itself based on the
instructions and data types it sees in the function?

Steve Ellcey
sell...@imgtec.com


Reply via email to