diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 51f324c959c..93d2f15b1fa 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -50,17 +50,17 @@ namespace llvm { v2i8 = 12, // 2 x i8 v4i8 = 13, // 4 x i8 - v8i8 = 14, // 8 x i8 + v8i8 = 14, // 8 x i8 - MMX type v16i8 = 15, // 16 x i8 v32i8 = 16, // 32 x i8 v2i16 = 17, // 2 x i16 - v4i16 = 18, // 4 x i16 + v4i16 = 18, // 4 x i16 - MMX type v8i16 = 19, // 8 x i16 v16i16 = 20, // 16 x i16 - v2i32 = 21, // 2 x i32 + v2i32 = 21, // 2 x i32 - MMX type v4i32 = 22, // 4 x i32 v8i32 = 23, // 8 x i32 - v1i64 = 24, // 1 x i64 + v1i64 = 24, // 1 x i64 - MMX type v2i64 = 25, // 2 x i64 v4i64 = 26, // 4 x i64 v8i64 = 27, // 8 x i64 @@ -74,11 +74,13 @@ namespace llvm { FIRST_VECTOR_VALUETYPE = v2i8, LAST_VECTOR_VALUETYPE = v4f64, - Flag = 33, // This glues nodes together during pre-RA sched + x86mmx = 33, // This is an X86 MMX value - isVoid = 34, // This has no value + Flag = 34, // This glues nodes together during pre-RA sched - LAST_VALUETYPE = 35, // This always remains at the end of the list. + isVoid = 35, // This has no value + + LAST_VALUETYPE = 36, // This always remains at the end of the list. // This is the current maximum for LAST_VALUETYPE. // EVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors @@ -247,6 +249,7 @@ namespace llvm { case i32 : case v4i8: case v2i16: return 32; + case x86mmx: case f64 : case i64 : case v8i8: diff --git a/include/llvm/CodeGen/ValueTypes.td b/include/llvm/CodeGen/ValueTypes.td index 8151c0be366..1b4c51e4e85 100644 --- a/include/llvm/CodeGen/ValueTypes.td +++ b/include/llvm/CodeGen/ValueTypes.td @@ -49,14 +49,15 @@ def v2i64 : ValueType<128, 25>; // 2 x i64 vector value def v4i64 : ValueType<256, 26>; // 4 x f64 vector value def v8i64 : ValueType<512, 27>; // 4 x f64 vector value -def v2f32 : ValueType<64, 28>; // 2 x f32 vector value +def v2f32 : ValueType<64 , 28>; // 2 x f32 vector value def v4f32 : ValueType<128, 29>; // 4 x f32 vector value def v8f32 : ValueType<256, 30>; // 8 x f32 vector value def v2f64 : ValueType<128, 31>; // 2 x f64 vector value def v4f64 : ValueType<256, 32>; // 4 x f64 vector value -def FlagVT : ValueType<0 , 33>; // Pre-RA sched glue -def isVoid : ValueType<0 , 34>; // Produces no value +def x86mmx : ValueType<0 , 33>; // X86 MMX value +def FlagVT : ValueType<0 , 34>; // Pre-RA sched glue +def isVoid : ValueType<0 , 35>; // Produces no value def MetadataVT: ValueType<0, 250>; // Metadata diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td index fb4f750f87b..1dcaa84b9de 100644 --- a/include/llvm/Intrinsics.td +++ b/include/llvm/Intrinsics.td @@ -109,6 +109,8 @@ def llvm_empty_ty : LLVMType; // { } def llvm_descriptor_ty : LLVMPointerType; // { }* def llvm_metadata_ty : LLVMType; // !{...} +def llvm_x86mmx_ty : LLVMType; + def llvm_v2i8_ty : LLVMType; // 2 x i8 def llvm_v4i8_ty : LLVMType; // 4 x i8 def llvm_v8i8_ty : LLVMType; // 8 x i8 diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index a98de5bc7b2..aef02a81f41 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -614,6 +614,9 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM) // FIXME: In order to prevent SSE instructions being expanded to MMX ones // with -msoft-float, disable use of MMX as well. if (!UseSoftFloat && !DisableMMX && Subtarget->hasMMX()) { + addRegisterClass(MVT::x86mmx, X86::VR64RegisterClass, false); + + // FIXME: Remove the rest of this stuff. addRegisterClass(MVT::v8i8, X86::VR64RegisterClass, false); addRegisterClass(MVT::v4i16, X86::VR64RegisterClass, false); addRegisterClass(MVT::v2i32, X86::VR64RegisterClass, false); diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp index d2a8ce34ae4..791044cc60b 100644 --- a/lib/VMCore/ValueTypes.cpp +++ b/lib/VMCore/ValueTypes.cpp @@ -110,6 +110,7 @@ std::string EVT::getEVTString() const { case MVT::isVoid: return "isVoid"; case MVT::Other: return "ch"; case MVT::Flag: return "flag"; + case MVT::x86mmx: return "x86mmx"; case MVT::v2i8: return "v2i8"; case MVT::v4i8: return "v4i8"; case MVT::v8i8: return "v8i8"; diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index b7aa9001010..091a32fb3fe 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -63,6 +63,7 @@ std::string llvm::getEnumName(MVT::SimpleValueType T) { case MVT::f80: return "MVT::f80"; case MVT::f128: return "MVT::f128"; case MVT::ppcf128: return "MVT::ppcf128"; + case MVT::x86mmx: return "MVT::x86mmx"; case MVT::Flag: return "MVT::Flag"; case MVT::isVoid: return "MVT::isVoid"; case MVT::v2i8: return "MVT::v2i8";