Revision: 128592
Author:   clattner
Date:     2007-06-18 22:10:41 -0700 (Mon, 18 Jun 2007)

Log Message:
-----------
Fix bugs handling the ldmxcsr and stmxcsr builtins

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp

Modified: apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp
===================================================================
--- apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp     2007-06-19 
02:22:47 UTC (rev 128591)
+++ apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp     2007-06-19 
05:10:41 UTC (rev 128592)
@@ -590,6 +590,7 @@
       Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse_ldmxcsr);
     Value *Ptr = CreateTemporary(Type::Int32Ty);
     Builder.CreateStore(Ops[0], Ptr);
+    Ptr = Builder.CreateBitCast(Ptr, PointerType::get(Type::Int8Ty), "tmp");
     Result = Builder.CreateCall(ldmxcsr, Ptr);
     return true;
   }
@@ -597,6 +598,7 @@
     Function *stmxcsr =
       Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse_stmxcsr);
     Value *Ptr = CreateTemporary(Type::Int32Ty);
+    Ptr = Builder.CreateBitCast(Ptr, PointerType::get(Type::Int8Ty), "tmp");
     Builder.CreateCall(stmxcsr, Ptr);
     Result = Builder.CreateLoad(Ptr, "tmp");
     return true;


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to