diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-01-29 07:36:07 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-29 07:36:07 +0000 |
commit | b0e14f2a878c1a823341d34ca8f8fe60419fb9ef (patch) | |
tree | 9098f6623acb5cdcfc334367e5bb5b07fd17a463 /lib/CodeGen/CGCall.cpp | |
parent | eac48dc189154eea5067310c5dd257dfe07c29aa (diff) |
x86_64: Support cases which map to returning multiple values in LLVM
(e.g., _Complex double -> { double, double } return).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 6d21622b16..dcff31739e 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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. |