<html>
<head>
<base href="https://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 --- - fastcc calling convention not workink on i386 32 bits"
href="https://llvm.org/bugs/show_bug.cgi?id=22903">22903</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fastcc calling convention not workink on i386 32 bits
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>3.6
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>raffalli@univ-savoie.fr
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The following very simple file demonstrate the bug:
----------------------------------------------
define fastcc i32 @f(i32 %x) {
%add = add i32 %x, 1
ret i32 %add
}
define i32 @main(i32 %argc, i8** %argv) {
%r = call i32 @f(i32 0)
ret i32 %r
}
----------------------------------------------
on 64 bits machine:
$ llc bug.ll
$ as -c -o bug.o bug.s
$ gcc -o bug.exe bug.o
$ ./bug.exe
$ echo $?
yields 1 as expected
forcing 32bits arch (no error, no warning)
$ llc -march=x86 bug.ll
$ as -march=i486 -32 -c -o bug.o bug.s
$ gcc -march=i486 -m32 -o bug.exe bug.o
$ ./bug.exe
$ echo $?
yields more or less random values</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>