aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/Alpha/AlphaTargetMachine.cpp2
-rw-r--r--lib/Target/IA64/IA64TargetMachine.cpp2
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h4
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp2
-rw-r--r--lib/Target/TargetData.cpp12
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp4
6 files changed, 19 insertions, 7 deletions
diff --git a/lib/Target/Alpha/AlphaTargetMachine.cpp b/lib/Target/Alpha/AlphaTargetMachine.cpp
index f051da4..85ec028 100644
--- a/lib/Target/Alpha/AlphaTargetMachine.cpp
+++ b/lib/Target/Alpha/AlphaTargetMachine.cpp
@@ -57,7 +57,7 @@ unsigned AlphaTargetMachine::getJITMatchQuality() {
}
AlphaTargetMachine::AlphaTargetMachine(const Module &M, const std::string &FS)
- : DataLayout("e"),
+ : DataLayout("e-f128:128:128"),
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
JITInfo(*this),
Subtarget(M, FS),
diff --git a/lib/Target/IA64/IA64TargetMachine.cpp b/lib/Target/IA64/IA64TargetMachine.cpp
index 51beaa1..71f614d 100644
--- a/lib/Target/IA64/IA64TargetMachine.cpp
+++ b/lib/Target/IA64/IA64TargetMachine.cpp
@@ -63,7 +63,7 @@ unsigned IA64TargetMachine::getModuleMatchQuality(const Module &M) {
/// IA64TargetMachine ctor - Create an LP64 architecture model
///
IA64TargetMachine::IA64TargetMachine(const Module &M, const std::string &FS)
- : DataLayout("e"),
+ : DataLayout("e-f80:128:128"),
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
TLInfo(*this) { // FIXME? check this stuff
}
diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h
index d1e135c..1ad3f13 100644
--- a/lib/Target/PowerPC/PPCSubtarget.h
+++ b/lib/Target/PowerPC/PPCSubtarget.h
@@ -104,8 +104,8 @@ public:
/// getTargetDataString - Return the pointer size and type alignment
/// properties of this subtarget.
const char *getTargetDataString() const {
- return isPPC64() ? "E-p:64:64-f64:32:64-i64:32:64"
- : "E-p:32:32-f64:32:64-i64:32:64";
+ return isPPC64() ? "E-p:64:64-f64:32:64-i64:32:64-f128:64:128"
+ : "E-p:32:32-f64:32:64-i64:32:64-f128:64:128";
}
/// isPPC64 - Return true if we are generating code for 64-bit pointer mode.
diff --git a/lib/Target/Sparc/SparcTargetMachine.cpp b/lib/Target/Sparc/SparcTargetMachine.cpp
index e0206d8..167e7ec 100644
--- a/lib/Target/Sparc/SparcTargetMachine.cpp
+++ b/lib/Target/Sparc/SparcTargetMachine.cpp
@@ -30,7 +30,7 @@ const TargetAsmInfo *SparcTargetMachine::createTargetAsmInfo() const {
/// SparcTargetMachine ctor - Create an ILP32 architecture model
///
SparcTargetMachine::SparcTargetMachine(const Module &M, const std::string &FS)
- : DataLayout("E-p:32:32"),
+ : DataLayout("E-p:32:32-f128:128:128"),
Subtarget(M, FS), InstrInfo(Subtarget),
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
}
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 301e8c1..bb1ad32 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -436,6 +436,13 @@ uint64_t TargetData::getTypeSize(const Type *Ty) const {
return 4;
case Type::DoubleTyID:
return 8;
+ case Type::PPC_FP128TyID:
+ case Type::FP128TyID:
+ return 16;
+ // In memory objects this is always aligned to a higher boundary, but
+ // only 10 bytes contain information.
+ case Type::X86_FP80TyID:
+ return 10;
case Type::VectorTyID: {
const VectorType *PTy = cast<VectorType>(Ty);
return PTy->getBitWidth() / 8;
@@ -493,6 +500,11 @@ unsigned char TargetData::getAlignment(const Type *Ty, bool abi_or_pref) const {
break;
case Type::FloatTyID:
case Type::DoubleTyID:
+ // PPC_FP128TyID and FP128TyID have different data contents, but the
+ // same size and alignment, so they look the same here.
+ case Type::PPC_FP128TyID:
+ case Type::FP128TyID:
+ case Type::X86_FP80TyID:
AlignType = FLOAT_ALIGN;
break;
case Type::VectorTyID: {
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 02fbf95..35be090 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -115,8 +115,8 @@ X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS,
bool is64Bit)
: Subtarget(M, FS, is64Bit),
DataLayout(Subtarget.is64Bit() ?
- std::string("e-p:64:64-f64:32:64-i64:32:64") :
- std::string("e-p:32:32-f64:32:64-i64:32:64")),
+ std::string("e-p:64:64-f64:32:64-i64:32:64-f80:128:128") :
+ std::string("e-p:32:32-f64:32:64-i64:32:64-f80:128:128")),
FrameInfo(TargetFrameInfo::StackGrowsDown,
Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4),
InstrInfo(*this), JITInfo(*this), TLInfo(*this) {