bugzilla-daemon
Mon, 05 Jul 2010 08:21:00 -0700
http://llvm.org/bugs/show_bug.cgi?id=7567
Summary: clang generates movaps instruction for insufficiently
aligned local on stack
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangb...@nondot.org
ReportedBy: jay.f...@gmail.com
CC: llvmbugs@cs.uiuc.edu
If I compile this source:
typedef __attribute__ ((aligned(16))) struct { unsigned long long x[2]; } L;
int one(L x);
int two(L x, L y) { return one(x) || one(y); }
with "clang -cc1 -S", I get:
two:
subq $88, %rsp
movq %rdi, 72(%rsp)
movq %rsi, 80(%rsp)
movq %rdx, 56(%rsp)
movq %rcx, 64(%rsp)
movaps 72(%rsp), %xmm0
movaps %xmm0, 32(%rsp)
...
Memory arguments to movaps are required to be 16-byte aligned, but the argument
"72(%rsp)" is only 8-byte aligned. This causes a segmentation fault at run
time.
I'm using LLVM and Clang built from trunk this morning, on Ubuntu 10.4 64-bit.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs