diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-16 19:31:14 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-16 19:31:14 +0000 |
commit | e89b41495ae804c8a5eaa910be910b6eff9bea5e (patch) | |
tree | 5af5990ec4acd1c9168c904854379f932a7bdd57 /llvm/lib/Target/ARM/ARMTargetMachine.cpp | |
parent | 5dfc94b160cbe600849caf3222434d3284b22979 (diff) | |
download | llvm-e89b41495ae804c8a5eaa910be910b6eff9bea5e.zip llvm-e89b41495ae804c8a5eaa910be910b6eff9bea5e.tar.gz llvm-e89b41495ae804c8a5eaa910be910b6eff9bea5e.tar.bz2 |
One last cleanup of LLVM's DataLayout strings.
Produce them in the same order on every target. The order is that of
getStringRepresentation: e|E-i*-f*-v*-a*-s*-n*-S*.
llvm-svn: 197411
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMTargetMachine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 0bc0fa2..0c9e0a4 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -71,6 +71,11 @@ static std::string computeDataLayout(ARMSubtarget &ST) { // Little endian. Pointers are 32 bits and aligned to 32 bits. std::string Ret = "e-p:32:32"; + // On thumb, i16,i18 and i1 have natural aligment requirements, but we try to + // align to 32. + 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. @@ -79,15 +84,10 @@ static std::string computeDataLayout(ARMSubtarget &ST) { else Ret += "-i64:64"; - // On thumb, i16,i18 and i1 have natural aligment requirements, but we try to - // align to 32. - if (ST.isThumb()) - Ret += "-i16:16:32-i8:8:32-i1:8:32"; - // 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. if (ST.isAPCS_ABI()) - Ret += "-v128:32:128-v64:32:64"; + Ret += "-v64:32:64-v128:32:128"; else Ret += "-v128:64:128"; |