akhuang updated this revision to Diff 214202.
akhuang added a comment.
Remove test case changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64931/new/
https://reviews.llvm.org/D64931
Files:
clang/lib/Basic/Targets/OSTargets.h
clang/lib/Basic/Targets/X86.h
clang/test/CodeGen/iamcu-abi.c
clang/test/CodeGen/target-data.c
llvm/lib/Target/X86/X86TargetMachine.cpp
Index: llvm/lib/Target/X86/X86TargetMachine.cpp
===================================================================
--- llvm/lib/Target/X86/X86TargetMachine.cpp
+++ llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -116,6 +116,9 @@
!TT.isArch64Bit())
Ret += "-p:32:32";
+ // Address spaces for 32 bit signed, 32 bit unsigned, and 64 bit pointers.
+ Ret += "-p253:32:32-p254:32:32-p255:64:64";
+
// Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
if (TT.isArch64Bit() || TT.isOSWindows() || TT.isOSNaCl())
Ret += "-i64:64";
Index: clang/test/CodeGen/target-data.c
===================================================================
--- clang/test/CodeGen/target-data.c
+++ clang/test/CodeGen/target-data.c
@@ -1,22 +1,22 @@
// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-UNKNOWN %s
-// I686-UNKNOWN: target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
+// I686-UNKNOWN: target datalayout = "e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-f64:32:64-f80:32-n8:16:32-S128"
// RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-DARWIN %s
-// I686-DARWIN: target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
+// I686-DARWIN: target datalayout = "e-m:o-p:32:32-p253:32:32-p254:32:32-p255:64:64-f64:32:64-f80:128-n8:16:32-S128"
// RUN: %clang_cc1 -triple i686-unknown-win32 -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-WIN32 %s
-// I686-WIN32: target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+// I686-WIN32: target datalayout = "e-m:x-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
// RUN: %clang_cc1 -triple i686-unknown-cygwin -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-CYGWIN %s
-// I686-CYGWIN: target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+// I686-CYGWIN: target datalayout = "e-m:x-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=X86_64 %s
-// X86_64: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+// X86_64: target datalayout = "e-m:e-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:128-n8:16:32:64-S128"
// RUN: %clang_cc1 -triple xcore-unknown-unknown -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=XCORE %s
@@ -88,11 +88,11 @@
// RUN: %clang_cc1 -triple i686-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=I686-NACL
-// I686-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32-S128"
+// I686-NACL: target datalayout = "e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-n8:16:32-S128"
// RUN: %clang_cc1 -triple x86_64-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=X86_64-NACL
-// X86_64-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32:64-S128"
+// X86_64-NACL: target datalayout = "e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-n8:16:32:64-S128"
// RUN: %clang_cc1 -triple arm-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=ARM-NACL
Index: clang/test/CodeGen/iamcu-abi.c
===================================================================
--- clang/test/CodeGen/iamcu-abi.c
+++ clang/test/CodeGen/iamcu-abi.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -triple i386-pc-elfiamcu -emit-llvm -o - %s | FileCheck %s
-// CHECK: target datalayout = "e-m:e-p:32:32-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32"
+// CHECK: target datalayout = "e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32"
// CHECK: target triple = "i386-pc-elfiamcu"
Index: clang/lib/Basic/Targets/X86.h
===================================================================
--- clang/lib/Basic/Targets/X86.h
+++ clang/lib/Basic/Targets/X86.h
@@ -340,7 +340,7 @@
LongDoubleWidth = 96;
LongDoubleAlign = 32;
SuitableAlign = 128;
- resetDataLayout("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128");
+ resetDataLayout("e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-f64:32:64-f80:32-n8:16:32-S128");
SizeType = UnsignedInt;
PtrDiffType = SignedInt;
IntPtrType = SignedInt;
@@ -440,7 +440,7 @@
UseSignedCharForObjCBool = false;
SizeType = UnsignedLong;
IntPtrType = SignedLong;
- resetDataLayout("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128");
+ resetDataLayout("e-m:o-p:32:32-p253:32:32-p254:32:32-p255:64:64-f64:32:64-f80:128-n8:16:32-S128");
HasAlignMac68kSupport = true;
}
@@ -466,8 +466,8 @@
bool IsWinCOFF =
getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
resetDataLayout(IsWinCOFF
- ? "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
- : "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32");
+ ? "e-m:x-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
+ : "e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32");
}
};
@@ -515,7 +515,7 @@
: X86_32TargetInfo(Triple, Opts) {
this->WCharType = TargetInfo::UnsignedShort;
DoubleAlign = LongLongAlign = 64;
- resetDataLayout("e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32");
+ resetDataLayout("e-m:x-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32");
}
void getTargetDefines(const LangOptions &Opts,
@@ -552,7 +552,7 @@
: X86_32TargetInfo(Triple, Opts) {
LongDoubleWidth = 64;
LongDoubleFormat = &llvm::APFloat::IEEEdouble();
- resetDataLayout("e-m:e-p:32:32-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32");
+ resetDataLayout("e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32");
WIntType = UnsignedInt;
}
@@ -612,9 +612,9 @@
// Pointers are 32-bit in x32.
resetDataLayout(IsX32
- ? "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"
- : IsWinCOFF ? "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
- : "e-m:e-i64:64-f80:128-n8:16:32:64-S128");
+ ? "e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:128-n8:16:32:64-S128"
+ : IsWinCOFF ? "e-m:w-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:128-n8:16:32:64-S128"
+ : "e-m:e-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:128-n8:16:32:64-S128");
// Use fpret only for long double.
RealTypeUsesObjCFPRet = (1 << TargetInfo::LongDouble);
@@ -804,7 +804,7 @@
llvm::Triple T = llvm::Triple(Triple);
if (T.isiOS())
UseSignedCharForObjCBool = false;
- resetDataLayout("e-m:o-i64:64-f80:128-n8:16:32:64-S128");
+ resetDataLayout("e-m:o-p253:32:32-p254:32:32-p255:64:64-i64:64-f80:128-n8:16:32:64-S128");
}
bool handleTargetFeatures(std::vector<std::string> &Features,
Index: clang/lib/Basic/Targets/OSTargets.h
===================================================================
--- clang/lib/Basic/Targets/OSTargets.h
+++ clang/lib/Basic/Targets/OSTargets.h
@@ -775,9 +775,9 @@
if (Triple.getArch() == llvm::Triple::arm) {
// Handled in ARM's setABI().
} else if (Triple.getArch() == llvm::Triple::x86) {
- this->resetDataLayout("e-m:e-p:32:32-i64:64-n8:16:32-S128");
+ this->resetDataLayout("e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-n8:16:32-S128");
} else if (Triple.getArch() == llvm::Triple::x86_64) {
- this->resetDataLayout("e-m:e-p:32:32-i64:64-n8:16:32:64-S128");
+ this->resetDataLayout("e-m:e-p:32:32-p253:32:32-p254:32:32-p255:64:64-i64:64-n8:16:32:64-S128");
} else if (Triple.getArch() == llvm::Triple::mipsel) {
// Handled on mips' setDataLayout.
} else {
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits