diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-11-02 04:51:36 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-11-02 04:51:36 +0000 |
commit | 1d9269a8d61b232cd5a814e0bf587bc89fabbd46 (patch) | |
tree | df280b32761d66dabf9afcaca44022d84dc9aa8e /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 682b850602d3380528c5ecafe352c48422e19724 (diff) | |
download | bcm5719-llvm-1d9269a8d61b232cd5a814e0bf587bc89fabbd46.tar.gz bcm5719-llvm-1d9269a8d61b232cd5a814e0bf587bc89fabbd46.zip |
Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.
llvm-svn: 143530
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 3744a29b3e0..88505e695d7 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -2671,6 +2671,14 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy) const { if (isEmptyRecord(getContext(), RetTy, true)) return ABIArgInfo::getIgnore(); + // Check for homogeneous aggregates with AAPCS-VFP. + if (getABIKind() == AAPCS_VFP) { + const Type *Base = 0; + if (isHomogeneousAggregate(RetTy, Base, getContext())) + // Homogeneous Aggregates are returned directly. + return ABIArgInfo::getDirect(); + } + // Aggregates <= 4 bytes are returned in r0; other aggregates // are returned indirectly. uint64_t Size = getContext().getTypeSize(RetTy); |