[LLVMbugs] [Bug 3196] New: Incorrect calling convention for MVR functions on Linux
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Dec 10 18:12:34 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3196
Summary: Incorrect calling convention for MVR functions on Linux
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: csdavec at swan.ac.uk
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=2291)
--> (http://llvm.org/bugs/attachment.cgi?id=2291)
Test case.
Attached is a zip file containing:
stub.c - a simple C program calling an external test function and implementing
three other functions, for printing and creating a simple structure.
f.ll - a failure case in LLVM, calling each of these functions. When compiled
with stub.c (compiled by the system compiler), the resulting output should be:
$ ./a.out
0 1
3 4
3 4
When compiling f.ll with LLVM and stub.c with GCC on FreeBSD, this is the case.
When doing the same on Linux, it is not. Instead, the last two lines, which
should be printing the structure returned by the C function, print something
which looks like some uninitialised memory.
scall.c - a C version of the test function in f.ll, for comparison.
scall-freebsd-gcc.s - the assembly produced by GCC from this test file on
FreeBSD (almost identical to the output from llc f.ll, on both FreeBSD and
Linux)
scall-linux-gcc.s - the assembly produced by GCC from this test file on Linux.
Note the:
leal -24(%ebp), %eax
movl %eax, (%esp)
between the first two call instructions - these are not present on FreeBSD or
in the output from llc.
--
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.
More information about the llvm-bugs
mailing list