diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index 0566defd052..e57a6ab75ad 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -978,6 +978,10 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) {
     addDirectMem(BuildMI(BB, X86::MOVrm32, 5), TmpReg2).addReg(TmpReg1);
     return;
 
+  case LLVMIntrinsic::longjmp:
+    BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true); 
+  case LLVMIntrinsic::setjmp:
+    return;
   default: assert(0 && "Unknown intrinsic for X86!");
   }
 }
diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp
index 0566defd052..e57a6ab75ad 100644
--- a/lib/Target/X86/X86ISelSimple.cpp
+++ b/lib/Target/X86/X86ISelSimple.cpp
@@ -978,6 +978,10 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) {
     addDirectMem(BuildMI(BB, X86::MOVrm32, 5), TmpReg2).addReg(TmpReg1);
     return;
 
+  case LLVMIntrinsic::longjmp:
+    BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true); 
+  case LLVMIntrinsic::setjmp:
+    return;
   default: assert(0 && "Unknown intrinsic for X86!");
   }
 }