http://llvm.org/bugs/show_bug.cgi?id=14113
Bug #: 14113
Summary: llvm incorrectly passes byval pointers in registers to
x86_fastcallcc functions
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: ASSIGNED
Severity: enhancement
Priority: P
Component: Backend: X86
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Given
struct foo {
int x;
};
void __attribute__((fastcall)) foo(struct foo y);
void bar(struct foo y) {
foo(y);
}
gcc produces
bar:
subl $24, %esp
pushl 28(%esp)
call foo
addl $24, %esp
ret
but clang produces
bar: # @bar
# BB#0:
subl $12, %esp
movl 16(%esp), %ecx
calll foo
addl $12, %esp
ret
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs