Implement support for MMX movd instruction generation.

Based on http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150202/257325.html
and http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20121029/154639.html

Change-Id: I098654245c06a975b8b0bc66e0feb5acea0e9c89
Reviewed-on: https://swiftshader-review.googlesource.com/4510
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Reactor/Nucleus.cpp b/src/Reactor/Nucleus.cpp
index 52ee089..179afb7 100644
--- a/src/Reactor/Nucleus.cpp
+++ b/src/Reactor/Nucleus.cpp
@@ -4184,13 +4184,12 @@
 		return Type::getInt64Ty(*Nucleus::getContext());
 	}
 
-	Long1::Long1(const Reference<UInt> &cast)
+	Long1::Long1(const RValue<UInt> cast)
 	{
-		Value *uint = cast.loadValue();
-		Value *int64 = Nucleus::createZExt(uint, Long::getType());
-		Value *long1 = Nucleus::createBitCast(int64, Long1::getType());
+		Value *undefCast = Nucleus::createInsertElement(UndefValue::get(VectorType::get(Int::getType(), 2)), cast.value, 0);
+		Value *zeroCast = Nucleus::createInsertElement(undefCast, Nucleus::createConstantInt(0), 1);
 
-		storeValue(long1);
+		storeValue(Nucleus::createBitCast(zeroCast, Long1::getType()));
 	}
 
 	Long1::Long1(RValue<Long1> rhs)
diff --git a/src/Reactor/Nucleus.hpp b/src/Reactor/Nucleus.hpp
index a892e21..a7aaf79 100644
--- a/src/Reactor/Nucleus.hpp
+++ b/src/Reactor/Nucleus.hpp
@@ -1310,11 +1310,9 @@
 	//	explicit Long1(RValue<Short> cast);

 	//	explicit Long1(RValue<UShort> cast);

 	//	explicit Long1(RValue<Int> cast);

-	//	explicit Long1(RValue<UInt> cast);

+		explicit Long1(RValue<UInt> cast);

 	//	explicit Long1(RValue<Float> cast);

 

-		explicit Long1(const Reference<UInt> &cast);

-

 	//	Long1();

 	//	Long1(qword x);

 		Long1(RValue<Long1> rhs);