This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/37010] New: -Os passes __m128 on stack with wrong alignment
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2008 17:29:37 -0000
- Subject: [Bug target/37010] New: -Os passes __m128 on stack with wrong alignment
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
-Os passes __m128 on stack with wrong alignment:
bash-3.2$ cat x.c
#include <emmintrin.h>
extern void foo (__m128 x, __m128 y ,__m128 z ,__m128 a, int size);
void
bar (void)
{
__m128 x = { 1.0 };
foo (x, x, x, x, 5);
}
bash-3.2$ /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -Os -msse2 -m32 x.c
-S
bash-3.2$ cat x.s
.file "x.c"
.text
.globl bar
.type bar, @function
bar:
pushl %ebp
movl %esp, %ebp
subl $20, %esp
movss .LC0, %xmm0
pushl $5
subl $16, %esp
movups %xmm0, (%esp)
^^^^^^^^^^^^^^^^ This should be aligned at 16byte with movaps.
movaps %xmm0, %xmm2
movaps %xmm0, %xmm1
call foo
addl $32, %esp
leave
ret
--
Summary: -Os passes __m128 on stack with wrong alignment
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37010