diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 9474942d2a0..ec8313eda42 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -980,6 +980,8 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) { case LLVMIntrinsic::longjmp: BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true); + return; + case LLVMIntrinsic::setjmp: // Setjmp always returns zero... BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0); @@ -1814,9 +1816,10 @@ void ISel::emitCastOperation(MachineBasicBlock *BB, case cByte: StoreTy = Type::ShortTy; StoreClass = cShort; break; case cShort: StoreTy = Type::IntTy; StoreClass = cInt; break; case cInt: StoreTy = Type::LongTy; StoreClass = cLong; break; - case cLong: - assert(0 &&"FIXME not implemented: cast FP to unsigned long long"); - abort(); + // The following treatment of cLong may not be perfectly right, + // but it survives chains of casts of the form + // double->ulong->double. + case cLong: StoreTy = Type::LongTy; StoreClass = cLong; break; default: assert(0 && "Unknown store class!"); } diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 9474942d2a0..ec8313eda42 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -980,6 +980,8 @@ void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) { case LLVMIntrinsic::longjmp: BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true); + return; + case LLVMIntrinsic::setjmp: // Setjmp always returns zero... BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0); @@ -1814,9 +1816,10 @@ void ISel::emitCastOperation(MachineBasicBlock *BB, case cByte: StoreTy = Type::ShortTy; StoreClass = cShort; break; case cShort: StoreTy = Type::IntTy; StoreClass = cInt; break; case cInt: StoreTy = Type::LongTy; StoreClass = cLong; break; - case cLong: - assert(0 &&"FIXME not implemented: cast FP to unsigned long long"); - abort(); + // The following treatment of cLong may not be perfectly right, + // but it survives chains of casts of the form + // double->ulong->double. + case cLong: StoreTy = Type::LongTy; StoreClass = cLong; break; default: assert(0 && "Unknown store class!"); }