summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-10-24 15:30:16 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-10-24 15:30:16 +0000
commitaa1b35590f8284aee769ba1b239713a75f3ca6f7 (patch)
treebe91a422034d95e4be3402cb3fdee5b5e2924a3e /clang/lib/CodeGen/TargetInfo.cpp
parentbe63968a5c30750ccb53f230c935c065c9e87600 (diff)
downloadbcm5719-llvm-aa1b35590f8284aee769ba1b239713a75f3ca6f7.tar.gz
bcm5719-llvm-aa1b35590f8284aee769ba1b239713a75f3ca6f7.zip
[mips] Mark aggregate arguments passed in registers with the inreg attribute
Summary: This allows us to easily identify them in the backend which in turn allows us to handle them correctly for big-endian targets (where they must be shifted into the upper bits of the register). Depends on D5961 Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits, theraven Differential Revision: http://reviews.llvm.org/D5962 llvm-svn: 220566
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 88ffabefe45..ea62e4e409d 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -5609,8 +5609,11 @@ MipsABIInfo::classifyArgumentType(QualType Ty, uint64_t &Offset) const {
// If we have reached here, aggregates are passed directly by coercing to
// another structure type. Padding is inserted if the offset of the
// aggregate is unaligned.
- return ABIArgInfo::getDirect(HandleAggregates(Ty, TySize), 0,
- getPaddingType(OrigOffset, CurrOffset));
+ ABIArgInfo ArgInfo =
+ ABIArgInfo::getDirect(HandleAggregates(Ty, TySize), 0,
+ getPaddingType(OrigOffset, CurrOffset));
+ ArgInfo.setInReg(true);
+ return ArgInfo;
}
// Treat an enum type as its underlying type.
OpenPOWER on IntegriCloud