|
@@ -188,7 +188,7 @@ GenericValue Interpreter::getConstantExprValue (ConstantExpr *CE,
|
|
|
getOperandValue(CE->getOperand(1), SF),
|
|
|
getOperandValue(CE->getOperand(2), SF));
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled ConstantExpr: " << *CE << "\n";
|
|
|
+ cerr << "Unhandled ConstantExpr: " << *CE << "\n";
|
|
|
abort();
|
|
|
return GenericValue();
|
|
|
}
|
|
@@ -236,7 +236,7 @@ static GenericValue executeAddInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(+, Float);
|
|
|
IMPLEMENT_BINARY_OPERATOR(+, Double);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Add instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Add instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -257,7 +257,7 @@ static GenericValue executeSubInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(-, Float);
|
|
|
IMPLEMENT_BINARY_OPERATOR(-, Double);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Sub instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Sub instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -278,7 +278,7 @@ static GenericValue executeMulInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(*, Float);
|
|
|
IMPLEMENT_BINARY_OPERATOR(*, Double);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Mul instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Mul instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -296,7 +296,7 @@ static GenericValue executeUDivInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SIGNLESS_BINOP(/, UInt, Int);
|
|
|
IMPLEMENT_SIGNLESS_BINOP(/, ULong, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for UDiv instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for UDiv instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -311,7 +311,7 @@ static GenericValue executeSDivInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SIGNLESS_BINOP(/, Int, UInt);
|
|
|
IMPLEMENT_SIGNLESS_BINOP(/, Long, ULong);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SDiv instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SDiv instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -324,7 +324,7 @@ static GenericValue executeFDivInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(/, Float);
|
|
|
IMPLEMENT_BINARY_OPERATOR(/, Double);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Div instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Div instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -339,7 +339,7 @@ static GenericValue executeURemInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SIGNLESS_BINOP(%, UInt, Int);
|
|
|
IMPLEMENT_SIGNLESS_BINOP(%, ULong, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for URem instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for URem instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -354,7 +354,7 @@ static GenericValue executeSRemInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SIGNLESS_BINOP(%, Int, UInt);
|
|
|
IMPLEMENT_SIGNLESS_BINOP(%, Long, ULong);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Rem instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Rem instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -371,7 +371,7 @@ static GenericValue executeFRemInst(GenericValue Src1, GenericValue Src2,
|
|
|
Dest.DoubleVal = fmod(Src1.DoubleVal, Src2.DoubleVal);
|
|
|
break;
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Rem instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Rem instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -391,7 +391,7 @@ static GenericValue executeAndInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(&, ULong);
|
|
|
IMPLEMENT_BINARY_OPERATOR(&, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for And instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for And instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -411,7 +411,7 @@ static GenericValue executeOrInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(|, ULong);
|
|
|
IMPLEMENT_BINARY_OPERATOR(|, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Or instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Or instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -431,7 +431,7 @@ static GenericValue executeXorInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_BINARY_OPERATOR(^, ULong);
|
|
|
IMPLEMENT_BINARY_OPERATOR(^, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Xor instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Xor instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -465,7 +465,7 @@ static GenericValue executeSetEQInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SETCC(==, Double);
|
|
|
IMPLEMENT_POINTERSETCC(==);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SetEQ instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SetEQ instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -488,7 +488,7 @@ static GenericValue executeSetNEInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_POINTERSETCC(!=);
|
|
|
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SetNE instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SetNE instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -510,7 +510,7 @@ static GenericValue executeSetLEInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SETCC(<=, Double);
|
|
|
IMPLEMENT_POINTERSETCC(<=);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SetLE instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SetLE instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -532,7 +532,7 @@ static GenericValue executeSetGEInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SETCC(>=, Double);
|
|
|
IMPLEMENT_POINTERSETCC(>=);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SetGE instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SetGE instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -554,7 +554,7 @@ static GenericValue executeSetLTInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SETCC(<, Double);
|
|
|
IMPLEMENT_POINTERSETCC(<);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SetLT instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SetLT instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -576,7 +576,7 @@ static GenericValue executeSetGTInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SETCC(>, Double);
|
|
|
IMPLEMENT_POINTERSETCC(>);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for SetGT instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for SetGT instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -609,7 +609,7 @@ void Interpreter::visitBinaryOperator(BinaryOperator &I) {
|
|
|
case Instruction::SetLT: R = executeSetLTInst(Src1, Src2, Ty); break;
|
|
|
case Instruction::SetGT: R = executeSetGTInst(Src1, Src2, Ty); break;
|
|
|
default:
|
|
|
- llvm_cerr << "Don't know how to handle this binary operator!\n-->" << I;
|
|
|
+ cerr << "Don't know how to handle this binary operator!\n-->" << I;
|
|
|
abort();
|
|
|
}
|
|
|
|
|
@@ -710,7 +710,7 @@ void Interpreter::visitUnwindInst(UnwindInst &I) {
|
|
|
}
|
|
|
|
|
|
void Interpreter::visitUnreachableInst(UnreachableInst &I) {
|
|
|
- llvm_cerr << "ERROR: Program executed an 'unreachable' instruction!\n";
|
|
|
+ cerr << "ERROR: Program executed an 'unreachable' instruction!\n";
|
|
|
abort();
|
|
|
}
|
|
|
|
|
@@ -978,7 +978,7 @@ static GenericValue executeShlInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SHIFT(<<, ULong);
|
|
|
IMPLEMENT_SHIFT(<<, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for Shl instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for Shl instruction: " << *Ty << "\n";
|
|
|
}
|
|
|
return Dest;
|
|
|
}
|
|
@@ -992,7 +992,7 @@ static GenericValue executeLShrInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SIGNLESS_SHIFT(>>, UInt, Int);
|
|
|
IMPLEMENT_SIGNLESS_SHIFT(>>, ULong, Long);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for LShr instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for LShr instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -1007,7 +1007,7 @@ static GenericValue executeAShrInst(GenericValue Src1, GenericValue Src2,
|
|
|
IMPLEMENT_SIGNLESS_SHIFT(>>, Int, UInt);
|
|
|
IMPLEMENT_SIGNLESS_SHIFT(>>, Long, ULong);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled type for AShr instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled type for AShr instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -1065,14 +1065,14 @@ void Interpreter::visitAShr(ShiftInst &I) {
|
|
|
IMPLEMENT_CAST(DESTTY, DESTCTY, Float); \
|
|
|
IMPLEMENT_CAST(DESTTY, DESTCTY, Double) \
|
|
|
default: \
|
|
|
- llvm_cerr << "Unhandled cast: " \
|
|
|
+ cerr << "Unhandled cast: " \
|
|
|
<< *SrcTy << " to " << *DstTy << "\n"; \
|
|
|
abort(); \
|
|
|
} \
|
|
|
break
|
|
|
|
|
|
#define IMPLEMENT_CAST_END \
|
|
|
- default: llvm_cerr \
|
|
|
+ default: cerr \
|
|
|
<< "Unhandled dest type for cast instruction: " \
|
|
|
<< *DstTy << "\n"; \
|
|
|
abort(); \
|
|
@@ -1226,8 +1226,7 @@ GenericValue Interpreter::executeCastOperation(Instruction::CastOps opcode,
|
|
|
IMPLEMENT_CAST_END
|
|
|
break;
|
|
|
default:
|
|
|
- llvm_cerr
|
|
|
- << "Invalid cast opcode for cast instruction: " << opcode << "\n";
|
|
|
+ cerr << "Invalid cast opcode for cast instruction: " << opcode << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
return Dest;
|
|
@@ -1266,7 +1265,7 @@ void Interpreter::visitVAArgInst(VAArgInst &I) {
|
|
|
IMPLEMENT_VAARG(Double);
|
|
|
IMPLEMENT_VAARG(Bool);
|
|
|
default:
|
|
|
- llvm_cerr << "Unhandled dest type for vaarg instruction: " << *Ty << "\n";
|
|
|
+ cerr << "Unhandled dest type for vaarg instruction: " << *Ty << "\n";
|
|
|
abort();
|
|
|
}
|
|
|
|