H.J. Lu writes:
> What value did you use for -mpreferred-stack-boundary? The x86 backend
> defaults to 16byte.

On Windows the 16-byte default pretty much just wastes space, so I use
-mpreferred-stack-boundary=2 where it might make a difference.  In the
case where I wanted to use SSE vector instructions, I explicitly used
-mpreferred-stack-boundary=4 (16-byte alignment).

>STACK_BOUNDARY is the minimum stack boundary. MAX(STACK_BOUNDARY,
>PREFERRED_STACK_BOUNDARY) == PREFERRED_STACK_BOUNDARY.  So the question is
>if we should assume INCOMING == PREFERRED_STACK_BOUNDARY in all cases:

Doing this would also remove need for ABI_STACK_BOUNDARY in your proposal.

>Pros:
>  1. Keep the current behaviour of -mpreferred-stack-boundary.
>
>Cons:
>  1. The generated code is incompatible with the other object files.

Well, your proposal wouldn't completely solve that problem, either.
You can't guarantee compatiblity with object files compiled with different
values -mpreferred-stack-boundary, including those compiled with current
implementation, unless you assume the incomming stack is aligned to
the lowest value the flag can have and align the outgoing stack to the
highest value that the flag can have.

                                                Ross Ridge

Reply via email to