> > > We have several choices for stack alignment requirement > > > > > > 1. Leave it unchanged. Gcc can do > > > a. Nothing. Let the program crash. > > > b. Align stack to 16byte if XMM registers are used locally and > > > aren't passed down as function arguments. > > > > Why not so if the XMM registers are passed down as arguments? > > When calling a function with XMM register arguments, doesn't caller > have to align stack to 16byte for callee?
Not necessarily, I think. Just like the caller aligned its stack to 16 bytes, the callee can do the same while still assuming the 4-byte alignment. And it's an even lesser problem with -msseregparm or the sseregparam attribute. -- _______________________________________________________ Evandro Menezes AMD Austin, TX