This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/28069] __m128 local variables don't get properly aligned.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]