diff options
author | Dale Johannesen <dalej@apple.com> | 2007-08-03 20:20:50 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-08-03 20:20:50 +0000 |
commit | c5283ecd6f85632332cedd75e8614e9a7ed1dc04 (patch) | |
tree | 8da90d676ef25d2f9a147596ad9a1891085e4c68 /llvm/lib/Target/TargetData.cpp | |
parent | 2d19aae4caec37fea3af77bc5094c2a166cd05e9 (diff) | |
download | bcm5719-llvm-c5283ecd6f85632332cedd75e8614e9a7ed1dc04.tar.gz bcm5719-llvm-c5283ecd6f85632332cedd75e8614e9a7ed1dc04.zip |
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.)
llvm-svn: 40792
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
-rw-r--r-- | llvm/lib/Target/TargetData.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 301e8c12ab4..bb1ad3271ba 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/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: { |