[llvm-branch-commits] [llvm-branch] r98882 - in /llvm/branches/Apple/Morbo: ./ lib/Target/X86/X86FastISel.cpp

Eric Christopher echristo at apple.com
Thu Mar 18 15:00:25 PDT 2010


Author: echristo
Date: Thu Mar 18 17:00:25 2010
New Revision: 98882

URL: http://llvm.org/viewvc/llvm-project?rev=98882&view=rev
Log:
Merge 98862 and 98881 from mainline.

Modified:
    llvm/branches/Apple/Morbo/   (props changed)
    llvm/branches/Apple/Morbo/lib/Target/X86/X86FastISel.cpp

Propchange: llvm/branches/Apple/Morbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 18 17:00:25 2010
@@ -1,2 +1,2 @@
 /llvm/branches/Apple/Hermes:96832,96835,96858,96870,96876,96879
-/llvm/trunk:98602,98604,98612,98615-98616,98675,98686,98743-98744,98773,98778,98780,98810,98835,98839,98855
+/llvm/trunk:98602,98604,98612,98615-98616,98675,98686,98743-98744,98773,98778,98780,98810,98835,98839,98855,98862,98881

Modified: llvm/branches/Apple/Morbo/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/X86/X86FastISel.cpp?rev=98882&r1=98881&r2=98882&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/X86/X86FastISel.cpp Thu Mar 18 17:00:25 2010
@@ -1166,6 +1166,21 @@
   // FIXME: Handle more intrinsics.
   switch (I.getIntrinsicID()) {
   default: return false;
+  case Intrinsic::stackprotector: {
+    // Emit code inline code to store the stack guard onto the stack.
+    EVT PtrTy = TLI.getPointerTy();
+
+    Value *Op1 = I.getOperand(1); // The guard's value.
+    AllocaInst *Slot = cast<AllocaInst>(I.getOperand(2));
+
+    // Grab the frame index.
+    X86AddressMode AM;
+    if (!X86SelectAddress(Slot, AM)) return false;
+    
+    if (!X86FastEmitStore(PtrTy, Op1, AM)) return false;
+    
+    return true;
+  }
   case Intrinsic::objectsize: {
     ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(2));
     const Type *Ty = I.getCalledFunction()->getReturnType();





More information about the llvm-branch-commits mailing list