PATCH: PR target/40838: gcc shouldn't assume that the stack is aligned

Michael Matz matz@suse.de
Tue Oct 20 01:12:00 GMT 2009


Hi,

On Mon, 19 Oct 2009, H.J. Lu wrote:

> The issues are
> 
> 1. The incoming stack alignment can't be changed after RTL expansion
> starts.

And that's the thing.  Just move the prologue expansion to after the body 
expansion (see cfgexpand.c) and you should be set.  No doubt you'll hit 
some ugly obstacles, but that should be the way forward.

> 2. When -mstackrealign is used, we want to use 4 byte incoming stack
> alignment on functions which use SSE vector insns.
> 3. SSE vector insns may be generated by intrinsics, vectorizer and
> vector operations.

All of these will be automatically taken care off when (1) is solved.  I 
really think it would be worth it.  Fiddling with stack alignment in the 
vectorizer (though that's the first alignment requirers you'll hit) is not 
going to fly in the long run.


Ciao,
Michael.



More information about the Gcc-patches mailing list