On APCS, only try to align aggregates to 32 bits instead of 64.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Dec 2013 21:36:54 +0000 (21:36 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Dec 2013 21:36:54 +0000 (21:36 +0000)
This matches clang's behavior and since it is only a preference, it is not
an ABI issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMTargetMachine.cpp

index 960f5ca5ed2459553469f5ae7a400ee8dfd1d4fd..b46ec1da0e8eb93e9a7e9c5fb075f23e0b6e3b7a 100644 (file)
@@ -92,9 +92,9 @@ static std::string computeDataLayout(ARMSubtarget &ST) {
   else
     Ret += "-v128:64:128";
 
-  // An aggregate of size 0 is ABI aligned to 0.
-  // FIXME: explain better what this means.
-  if (ST.isThumb())
+  // On thumb and APCS, only try to align aggregates to 32 bits (the default is
+  // 64 bits).
+  if (ST.isThumb() || ST.isAPCS_ABI())
     Ret += "-a:0:32";
 
   // Integer registers are 32 bits.