[cfe-commits] r63285 - /cfe/trunk/lib/CodeGen/CGCall.cpp
Daniel Dunbar
daniel at zuster.org
Wed Jan 28 23:36:07 PST 2009
Author: ddunbar
Date: Thu Jan 29 01:36:07 2009
New Revision: 63285
URL: http://llvm.org/viewvc/llvm-project?rev=63285&view=rev
Log:
x86_64: Support cases which map to returning multiple values in LLVM
(e.g., _Complex double -> { double, double } return).
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=63285&r1=63284&r2=63285&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Jan 29 01:36:07 2009
@@ -155,7 +155,6 @@
return ABIArgInfo(Ignore);
}
static ABIArgInfo getCoerce(const llvm::Type *T) {
- assert(T->isSingleValueType() && "Can only coerce to simple types");
return ABIArgInfo(Coerce, T);
}
static ABIArgInfo getByVal(unsigned Alignment) {
@@ -541,9 +540,11 @@
case NoClass: break;
case Integer:
- assert(0 && "FIXME: Implement MRV"); break;
+ ResType = llvm::StructType::get(ResType, llvm::Type::Int64Ty, NULL);
+ break;
case SSE:
- assert(0 && "FIXME: Implement MRV"); break;
+ ResType = llvm::StructType::get(ResType, llvm::Type::DoubleTy, NULL);
+ break;
// AMD64-ABI 3.2.3p4: Rule 5. If the class is SSEUP, the eightbyte
// is passed in the upper half of the last used SSE register.
@@ -555,7 +556,7 @@
break;
// AMD64-ABI 3.2.3p4: Rule 7. If the class is X87UP, the value is
- // returned together with the previos X87 value in %st0.
+ // returned together with the previous X87 value in %st0.
//
// X87UP should always be preceeded by X87, so we don't need to do
// anything here.
More information about the cfe-commits
mailing list