[cfe-commits] r161694 - in /cfe/trunk: lib/CodeGen/TargetInfo.cpp test/CodeGen/arm-arguments.c
Manman Ren
mren at apple.com
Fri Aug 10 13:42:32 PDT 2012
Author: mren
Date: Fri Aug 10 15:42:31 2012
New Revision: 161694
URL: http://llvm.org/viewvc/llvm-project?rev=161694&view=rev
Log:
ARM: enable struct byval for AAPCS.
rdar://9877866
PR://13350
Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp
cfe/trunk/test/CodeGen/arm-arguments.c
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=161694&r1=161693&r2=161694&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Fri Aug 10 15:42:31 2012
@@ -2757,9 +2757,7 @@
}
}
- // FIXME: byval for AAPCS is not yet supported; we need it for performance
- // and to support large alignment.
- if (getABIKind() == ARMABIInfo::APCS) {
+ if (getABIKind() == ARMABIInfo::APCS || getABIKind() == ARMABIInfo::AAPCS) {
if (getContext().getTypeSizeInChars(Ty) > CharUnits::fromQuantity(64) ||
getContext().getTypeAlign(Ty) > 64) {
return ABIArgInfo::getIndirect(0, /*ByVal=*/true);
Modified: cfe/trunk/test/CodeGen/arm-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-arguments.c?rev=161694&r1=161693&r2=161694&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm-arguments.c (original)
+++ cfe/trunk/test/CodeGen/arm-arguments.c Fri Aug 10 15:42:31 2012
@@ -172,3 +172,9 @@
void f32(struct s32 s) { }
// AAPCS: @f32([1 x i64] %s.coerce)
// APCS-GNU: @f32([2 x i32] %s.coerce)
+
+// PR13350
+struct s33 { char buf[32*32]; };
+void f33(struct s33 s) { }
+// APCS-GNU: define void @f33(%struct.s33* byval %s)
+// AAPCS: define arm_aapcscc void @f33(%struct.s33* byval %s)
More information about the cfe-commits
mailing list