<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Alignment of float arrays in pentium3 mode"
href="http://llvm.org/bugs/show_bug.cgi?id=15434">15434</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Alignment of float arrays in pentium3 mode
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>klimek@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Consider the following snippet:
#include <xmmintrin.h>
#include <stdio.h>
void f() {
UNALIGN_TYPE unalign;
float step[32];
printf("%lld\n", (long long)(&step[0]) % 16);
__m128 result[8];
_mm_store_ps(&step[0], result[0]);
}
int main() {
f();
}
$ g++ -DUNALIGN_TYPE=float t.cc -o t -m32 -march=pentium3 -O0 && ./t &&
~/build/llvm-opt/bin/clang++ -DUNALIGN_TYPE=float t.cc -o t -m32
-march=pentium3 -O0 && ./t
0
12
Segmentation fault (core dumped)
$ g++ -DUNALIGN_TYPE=double t.cc -o t -m32 -march=pentium3 -O0 && ./t &&
~/build/llvm-opt/bin/clang++ -DUNALIGN_TYPE=double t.cc -o t -m32
-march=pentium3 -O0 && ./t
0
8
Segmentation fault (core dumped)
GCC seems to 16-byte align the float arrays. Chandler mentioned that this thus
is part of the implicit ABI.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>