summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-29 07:36:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-29 07:36:07 +0000
commit227e1a77ff53c141af3ed3921ecd5761ea089316 (patch)
treec1107475c5dd9aa9c10805f223bba5cc5f1f60cf /clang/lib/CodeGen/CGCall.cpp
parent8e6652affceeb34237bf9470296ff22be3ee9891 (diff)
downloadbcm5719-llvm-227e1a77ff53c141af3ed3921ecd5761ea089316.tar.gz
bcm5719-llvm-227e1a77ff53c141af3ed3921ecd5761ea089316.zip
x86_64: Support cases which map to returning multiple values in LLVM
(e.g., _Complex double -> { double, double } return). llvm-svn: 63285
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 6d21622b166..dcff31739e0 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -155,7 +155,6 @@ public:
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 @@ ABIArgInfo X86_64ABIInfo::classifyReturnType(QualType RetTy,
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 @@ ABIArgInfo X86_64ABIInfo::classifyReturnType(QualType RetTy,
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.
OpenPOWER on IntegriCloud