summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-17 21:28:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-17 21:28:36 +0000
commit3179bf24b4b41c1a5e045a1f342f54a02d212406 (patch)
treea43637bb2140962c0627c9767e906bd7002e6314 /lib
parent1655b73734cc8f19160eb6be863203c571468d18 (diff)
downloadllvm-3179bf24b4b41c1a5e045a1f342f54a02d212406.tar.gz
llvm-3179bf24b4b41c1a5e045a1f342f54a02d212406.tar.bz2
llvm-3179bf24b4b41c1a5e045a1f342f54a02d212406.tar.xz
Handle i64 first for clarity. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMTargetMachine.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp
index 0c9e0a4720..960f5ca5ed 100644
--- a/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/lib/Target/ARM/ARMTargetMachine.cpp
@@ -76,13 +76,14 @@ static std::string computeDataLayout(ARMSubtarget &ST) {
if (ST.isThumb())
Ret += "-i1:8:32-i8:8:32-i16:16:32";
- // We have 64 bits floats and integers. The APCS ABI requires them to be
- // aligned s them to 32 bits, others to 64 bits. We always try to align to
- // 64 bits.
+ // ABIs other than APC have 64 bit integers with natural alignment.
+ if (!ST.isAPCS_ABI())
+ Ret += "-i64:64";
+
+ // We have 64 bits floats. The APCS ABI requires them to be aligned to 32
+ // bits, others to 64 bits. We always try to align to 64 bits.
if (ST.isAPCS_ABI())
Ret += "-f64:32:64";
- else
- Ret += "-i64:64";
// We have 128 and 64 bit vectors. The APCS ABI aligns them to 32 bits, others
// to 64. We always ty to give them natural alignment.