<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 - x32: support variadic functions"
href="https://bugs.llvm.org/show_bug.cgi?id=48428">48428</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>x32: support variadic functions
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>harald@gigawatt.nl
</td>
</tr>
<tr>
<th>Reporter</th>
<td>harald@gigawatt.nl
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, pengfei.wang@intel.com, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>The x86-64 ABI defines va_list as:
typedef struct {
unsigned int gp_offset;
unsigned int fp_offset;
void *overflow_arg_area;
void *reg_save_area;
} va_list[1];
LLVM hardcodes size, alignment and member offsets of this struct based on the
LP64 model, where the pointers have a size and alignment of 8 bytes. In the
ILP32 model, this is not correct. This occurs in X86ISelLowering in at least
LowerVACOPY and X86TargetLowering::EmitVAARG64WithCustomInserter.
I am reporting but self-assigning this to make sure it does not get forgotten.
The fixes for this are already available as part of
<<a href="https://github.com/hjl-tools/llvm-x32-old/commit/2eec4c329b38cdedc38e1dbd978f0d927cc4a54e">https://github.com/hjl-tools/llvm-x32-old/commit/2eec4c329b38cdedc38e1dbd978f0d927cc4a54e</a>>,
just need to be extracted and possibly cleaned up.</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>