diff options
author | Dale Johannesen <dalej@apple.com> | 2007-08-03 20:51:37 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-08-03 20:51:37 +0000 |
commit | e713d9340a1d5dfb816c36d884f667a381981eb2 (patch) | |
tree | 58b8a69eab34834b322ef8ea736b4de67c459691 /lib/VMCore | |
parent | 8c1e6a119a68b258365677a9ee5176af3525a26f (diff) | |
download | external_llvm-e713d9340a1d5dfb816c36d884f667a381981eb2.zip external_llvm-e713d9340a1d5dfb816c36d884f667a381981eb2.tar.gz external_llvm-e713d9340a1d5dfb816c36d884f667a381981eb2.tar.bz2 |
long double patch 3 of N. Add to MVT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/ValueTypes.cpp | 107 |
1 files changed, 57 insertions, 50 deletions
diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp index 3ea33ce..3d9951b 100644 --- a/lib/VMCore/ValueTypes.cpp +++ b/lib/VMCore/ValueTypes.cpp @@ -26,32 +26,33 @@ std::string MVT::getValueTypeString(MVT::ValueType VT) { return "v" + utostr(getVectorNumElements(VT)) + getValueTypeString(getVectorElementType(VT)); assert(0 && "Invalid ValueType!"); - case MVT::i1: return "i1"; - case MVT::i8: return "i8"; - case MVT::i16: return "i16"; - case MVT::i32: return "i32"; - case MVT::i64: return "i64"; - case MVT::i128: return "i128"; - case MVT::f32: return "f32"; - case MVT::f64: return "f64"; - case MVT::f80: return "f80"; - case MVT::f128: return "f128"; - case MVT::isVoid:return "isVoid"; - case MVT::Other: return "ch"; - case MVT::Flag: return "flag"; - case MVT::v8i8: return "v8i8"; - case MVT::v4i16: return "v4i16"; - case MVT::v2i32: return "v2i32"; - case MVT::v1i64: return "v1i64"; - case MVT::v16i8: return "v16i8"; - case MVT::v8i16: return "v8i16"; - case MVT::v4i32: return "v4i32"; - case MVT::v2i64: return "v2i64"; - case MVT::v2f32: return "v2f32"; - case MVT::v4f32: return "v4f32"; - case MVT::v2f64: return "v2f64"; - case MVT::v3i32: return "v3i32"; - case MVT::v3f32: return "v3f32"; + case MVT::i1: return "i1"; + case MVT::i8: return "i8"; + case MVT::i16: return "i16"; + case MVT::i32: return "i32"; + case MVT::i64: return "i64"; + case MVT::i128: return "i128"; + case MVT::f32: return "f32"; + case MVT::f64: return "f64"; + case MVT::f80: return "f80"; + case MVT::f128: return "f128"; + case MVT::ppcf128: return "ppcf128"; + case MVT::isVoid: return "isVoid"; + case MVT::Other: return "ch"; + case MVT::Flag: return "flag"; + case MVT::v8i8: return "v8i8"; + case MVT::v4i16: return "v4i16"; + case MVT::v2i32: return "v2i32"; + case MVT::v1i64: return "v1i64"; + case MVT::v16i8: return "v16i8"; + case MVT::v8i16: return "v8i16"; + case MVT::v4i32: return "v4i32"; + case MVT::v2i64: return "v2i64"; + case MVT::v2f32: return "v2f32"; + case MVT::v4f32: return "v4f32"; + case MVT::v2f64: return "v2f64"; + case MVT::v3i32: return "v3i32"; + case MVT::v3f32: return "v3f32"; } } @@ -66,27 +67,30 @@ const Type *MVT::getTypeForValueType(MVT::ValueType VT) { getVectorNumElements(VT)); assert(0 && "ValueType does not correspond to LLVM type!"); case MVT::isVoid:return Type::VoidTy; - case MVT::i1: return Type::Int1Ty; - case MVT::i8: return Type::Int8Ty; - case MVT::i16: return Type::Int16Ty; - case MVT::i32: return Type::Int32Ty; - case MVT::i64: return Type::Int64Ty; - case MVT::i128: return IntegerType::get(128); - case MVT::f32: return Type::FloatTy; - case MVT::f64: return Type::DoubleTy; - case MVT::v8i8: return VectorType::get(Type::Int8Ty, 8); - case MVT::v4i16: return VectorType::get(Type::Int16Ty, 4); - case MVT::v2i32: return VectorType::get(Type::Int32Ty, 2); - case MVT::v1i64: return VectorType::get(Type::Int64Ty, 1); - case MVT::v16i8: return VectorType::get(Type::Int8Ty, 16); - case MVT::v8i16: return VectorType::get(Type::Int16Ty, 8); - case MVT::v4i32: return VectorType::get(Type::Int32Ty, 4); - case MVT::v2i64: return VectorType::get(Type::Int64Ty, 2); - case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); - case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); - case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); - case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); - case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); + case MVT::i1: return Type::Int1Ty; + case MVT::i8: return Type::Int8Ty; + case MVT::i16: return Type::Int16Ty; + case MVT::i32: return Type::Int32Ty; + case MVT::i64: return Type::Int64Ty; + case MVT::i128: return IntegerType::get(128); + case MVT::f32: return Type::FloatTy; + case MVT::f64: return Type::DoubleTy; + case MVT::f80: return Type::X86_FP80Ty; + case MVT::f128: return Type::FP128Ty; + case MVT::ppcf128: return Type::PPC_FP128Ty; + case MVT::v8i8: return VectorType::get(Type::Int8Ty, 8); + case MVT::v4i16: return VectorType::get(Type::Int16Ty, 4); + case MVT::v2i32: return VectorType::get(Type::Int32Ty, 2); + case MVT::v1i64: return VectorType::get(Type::Int64Ty, 1); + case MVT::v16i8: return VectorType::get(Type::Int8Ty, 16); + case MVT::v8i16: return VectorType::get(Type::Int16Ty, 8); + case MVT::v4i32: return VectorType::get(Type::Int32Ty, 4); + case MVT::v2i64: return VectorType::get(Type::Int64Ty, 2); + case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); + case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); + case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); } } @@ -114,9 +118,12 @@ MVT::ValueType MVT::getValueType(const Type *Ty, bool HandleUnknown) { case 128: return MVT::i128; } break; - case Type::FloatTyID: return MVT::f32; - case Type::DoubleTyID: return MVT::f64; - case Type::PointerTyID: return MVT::iPTR; + case Type::FloatTyID: return MVT::f32; + case Type::DoubleTyID: return MVT::f64; + case Type::X86_FP80TyID: return MVT::f80; + case Type::FP128TyID: return MVT::f128; + case Type::PPC_FP128TyID: return MVT::ppcf128; + case Type::PointerTyID: return MVT::iPTR; case Type::VectorTyID: { const VectorType *VTy = cast<VectorType>(Ty); return getVectorType(getValueType(VTy->getElementType(), false), |