Update DataLayout/DescriptionString for ppc64le

Update DataLayout/DescriptionString for ppc64le

Similar LLVM change made in r203664

Testcase included.

llvm-svn: 204613
This commit is contained in:
Will Schmidt 2014-03-24 15:48:02 +00:00
parent 68fd4c784c
commit 0c67b7e3f2
2 changed files with 11 additions and 2 deletions

View File

@ -1245,8 +1245,13 @@ public:
LongDoubleWidth = LongDoubleAlign = 64;
LongDoubleFormat = &llvm::APFloat::IEEEdouble;
DescriptionString = "E-m:e-i64:64-n32:64";
} else
DescriptionString = "E-m:e-i64:64-n32:64";
} else {
if ((Triple.getArch() == llvm::Triple::ppc64le)) {
DescriptionString = "e-m:e-i64:64-n32:64";
} else {
DescriptionString = "E-m:e-i64:64-n32:64";
}
}
// PPC64 supports atomics up to 8 bytes.
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;

View File

@ -90,6 +90,10 @@
// RUN: FileCheck %s -check-prefix=PPC64-LINUX
// PPC64-LINUX: target datalayout = "E-m:e-i64:64-n32:64"
// RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC64LE-LINUX
// PPC64LE-LINUX: target datalayout = "e-m:e-i64:64-n32:64"
// RUN: %clang_cc1 -triple powerpc-darwin -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC32-DARWIN
// PPC32-DARWIN: target datalayout = "E-m:o-p:32:32-f64:32:64-n32"