Re: [PATCH] i386: fix stack alignment for signal handlers

From: Andi Kleen
Date: Tue Sep 13 2005 - 23:55:32 EST


> Andi - you know the gcc people, is there some documented rules somewhere?
> How does gcc itself try to align the stack when it generates the calls?

The x86-64 ABI says

>>
The end of the input argument area shall be aligned on a 16 byte boundary.
In other words, the value (%rsp - 8) is always a multiple of 16 when control is
transferred to the function entry point. The stack pointer, %rsp, always points to
the end of the latest allocated stack frame. 7
<<

I presume acts i386 (it's likely undocumented because the ABI documents
predate this), but Jan surely can confirm?

It makes sense because when long double is passed on the stack
you really want them to be aligned there.

This would mean Markus' patch is correct for x86-64 and likely for i386
too.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/