This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/28069] __m128 local variables don't get properly aligned.
- From: "zuxy dot meng at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2006 06:25:41 -0000
- Subject: [Bug target/28069] __m128 local variables don't get properly aligned.
- References: <bug-28069-12845@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from zuxy dot meng at gmail dot com 2006-06-17 06:25 -------
Created an attachment (id=11685)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11685&action=view)
The file that gcc fails to compile correctly.
Use gcc -S -msse and look at the assembly. GCC allocates __m128 locals directly
on the stack without adjusting ESP, which might not be 16-byte aligned. But GCC
uses movaps, which requires its operand to be 16-byte aligned, to access those
locals.
ICC solves this problem by adding
pushl %ebp
movl %esp, %ebp
andl $-16, %esp
to the function prolog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28069