r204613 - Update DataLayout/DescriptionString for ppc64le
Will Schmidt
will_schmidt at vnet.ibm.com
Mon Mar 24 08:48:03 PDT 2014
Author: willschm
Date: Mon Mar 24 10:48:02 2014
New Revision: 204613
URL: http://llvm.org/viewvc/llvm-project?rev=204613&view=rev
Log:
Update DataLayout/DescriptionString for ppc64le
Update DataLayout/DescriptionString for ppc64le
Similar LLVM change made in r203664
Testcase included.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/CodeGen/target-data.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=204613&r1=204612&r2=204613&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Mar 24 10:48:02 2014
@@ -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;
Modified: cfe/trunk/test/CodeGen/target-data.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/target-data.c?rev=204613&r1=204612&r2=204613&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/target-data.c (original)
+++ cfe/trunk/test/CodeGen/target-data.c Mon Mar 24 10:48:02 2014
@@ -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"
More information about the cfe-commits
mailing list