[LLVMbugs] [Bug 13012] New: Support -fpcc-struct-return (IsSmallStructInRegABI)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 1 17:52:49 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13012
Bug #: 13012
Summary: Support -fpcc-struct-return (IsSmallStructInRegABI)
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: arthur.j.odwyer at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
We're trying to compile some C code with clang on Darwin (Mac OS X), but for
very specific and obscure reasons we'd like the generated code to use the
-fpcc-struct-return convention to return small structs on the stack, instead of
in EAX/EDX.
GCC provides the options -fpcc-struct-return, -freg-struct-return to switch
between the two possible conventions. Clang doesn't implement these options
yet. It would make our lives a tiny bit easier if Clang did.
Back in 2009, David Chisnall proposed a refactoring of some related code to
change the default convention for FreeBSD, but this patch didn't go so far as
to suggest a command-line option.
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-August/006125.html
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-August/006161.html
The code to select the value of IsSmallStructInRegABI appears to be in
"lib/CodeGen/TargetInfo.cpp".
Ideally, you'd probably like to refactor the whole thing so that the booleans
IsDarwinVectorABI, IsSmallStructInRegABI, IsMMXDisabled, and
IsWin32FloatStructABI were all independently switchable via the command line,
rather than hard-coded "guessing" based on the target system's triple.
--
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