> > > > > 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. > > How are XMM arguments passed by default? What happens when there are > more 16 XMM parameters? > Is XMM supported with variable argument list?
I see. Provided a local is passed in a register to a non-vararg function, it is still OK to align the stack. -- _______________________________________________________ Evandro Menezes AMD Austin, TX