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*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-12-16 19:31:14 +00:00
parent 068fa852b6
commit c4bc055bb4
5 changed files with 16 additions and 15 deletions

View File

@@ -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";