[LLVMbugs] [Bug 729] NEW: Need to adjust stack ptr after call to a function which returns > 8 byte data
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Apr 7 12:24:24 PDT 2006
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=729
Summary: Need to adjust stack ptr after call to a function which
returns > 8 byte data
Product: libraries
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: major
Priority: P2
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: evan.cheng at apple.com
This causes CoyoteBench/fftbench to fail on Mac OS X / x86.
According to Mac OS X IA-32 ABI doc:
The called function places structures and unions larger than 8 bytes (including vectors) at the address
supplied by the caller. When the function returns, it also removes this address from the stack. For
example, the _Complex double data type is 16 bytes in size; the called function returns results of this
type in the location indicated by the caller. See "Passing Arguments" for more information.
So the %esp has to be adjusted after a call to a function that returns value whose size > 8 bytes.
e.g.
#include <complex.h>
complex double G;
void test() {
G = cexp(G);
}
gcc generated:
call L_cexp$stub
subl $4, %esp
LLVM generated assembly is missing the subl following the call.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list