[PATCH] configure: win32 has 4 byte argument aligment, we have more

Marcus Meissner meissner at suse.de
Mon Apr 19 04:23:01 CDT 2010


On Mon, Apr 19, 2010 at 11:10:54AM +0200, Alexandre Julliard wrote:
> Marcus Meissner <meissner at suse.de> writes:
> 
> > Hi,
> >
> > The Win32 ABI has its stack arguments aligned at 4 (2^2) bytes.
> > For MMX/SSE operations we however need to have the stack aligned
> > to 16 (2^4).
> >
> > So specify this explicitly.
> >
> > (This should probably be even part of attribute((stdcall)) perhaps
> >  in gcc. Not sure though.)
> 
> It needs to be the default in gcc. It's not specific to stdcall or to
> Wine, there's plenty of Linux code that doesn't align the stack either.
> gcc can't start generating code that assumes 16-byte alignment on Linux.

This is not going to fly, as I very much doubt we will be able to
convince them.

Do we have examples of Linux code that doesn't do it?

They have their call chain adjusted to have 16 byte alignment and only
ensure this for main() and so suggest to the developers to either use
-mincoming/outgoing stack alignment or supply attribute if functions or
code does not fulfil it.

Ciao, Marcus



More information about the wine-devel mailing list