This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/40838: gcc shouldn't assume that the stack is aligned
- From: Mikulas Patocka <mikulas at artax dot karlin dot mff dot cuni dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, ubizjak at gmail dot com
- Date: Fri, 7 Aug 2009 02:54:46 +0200 (CEST)
- Subject: Re: PATCH: PR target/40838: gcc shouldn't assume that the stack is aligned
> > In 32bit, the incoming stack may not be 16 byte aligned. This patch
> > assumes the incoming stack is 4 byte aligned and realigns stack if any
> > SSE variable is put on stack. Any comments?
>
> IMHO this is wrong, I could live with a non-default option for those who
> don't care about performance and think a SCO document from 1996 has any
> relevance to Linux these days. In reality a Linux ABI for years assumes
> 16 byte stack alignment for 32-bit code.
>
> Jakub
Tell me which Linux distribution did you run with 16-byte stack alignment
checking (as proposed in bug 40838) and what was the result?
For me, the result was that 75% of binaries in /bin in Debian Lenny do not
align the stack on 16-byte boundary.
Mikulas