long double patch 2 of N. Handle it in TargetData.
(I've tried to get the info right for all targets,
but I'm not expert on all of them - check yours.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40792 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@
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 @@
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: {