[Bug target/47842] gcc forces 16-byte stack alignment on Solaris i386, when SYSV requires word alignment

yuri at tsoft dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 22 19:43:00 GMT 2011


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.



More information about the Gcc-bugs mailing list