This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47842] gcc forces 16-byte stack alignment on Solaris i386, when SYSV requires word alignment
- From: "yuri at tsoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Feb 2011 19:23:47 +0000
- Subject: [Bug target/47842] gcc forces 16-byte stack alignment on Solaris i386, when SYSV requires word alignment
- Auto-submitted: auto-generated
- References: <bug-47842-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47842
--- Comment #3 from Yuri <yuri at tsoft dot com> 2011-02-22 19:23:45 UTC ---
If gcc would only set 16 byte alignment this wouldn't be that bad since, as you
mentioned, it is still word aligned.
The problem is that gcc assumes that stack is 16 aligned and creates code based
on this. For example it places instruction like this 'movdqa %xmm0, 0x10(%esp)'
which assumes 16 byte alignment. As a result, gcc compiled procedure crashes
when called by ABI compliant code.
gcc can't assume 16 byte alignment.