<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - LLVM does not correctly align __int128 parameters passed on the stack"
href="https://bugs.llvm.org/show_bug.cgi?id=34646">34646</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM does not correctly align __int128 parameters passed on the stack
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>js-llvm-bugzilla@webkeks.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Quoting from the x86_64 ABI:
Arguments of type __int128 offer the same operations as INTEGERs,
yet they do not fit into one general purpose register but require two
registers. For classification purposes __int128 is treated as if it
were implemented as:
typedef struct {
long low, high;
} __int128;
with the exception that arguments of type __int128 that are
stored in memory must be aligned on a 16-byte boundary.
However, Clang does not align them on a 16-byte boundary.
This results in Clang using a different ABI than GCC and others, resulting in
incompatible code.
E.g. the following code will create a function with a different ABI when
compiled with Clang and GCC:
__int128
test(__int128 a, __int128 b, __int128 c, __int128 d)
{
return a + b + c +d;
}</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>