mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Remove support for NOT instruction
llvm-svn: 3313
This commit is contained in:
parent
ce6d033e05
commit
c8183d92e3
@ -268,34 +268,6 @@ Annotation *GlobalAddress::Create(AnnotationID AID, const Annotable *O, void *){
|
||||
return new GlobalAddress(Addr, true); // Simply invoke the ctor
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Unary Instruction Implementations
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define IMPLEMENT_UNARY_OPERATOR(OP, TY) \
|
||||
case Type::TY##TyID: Dest.TY##Val = OP Src.TY##Val; break
|
||||
|
||||
static void executeNotInst(UnaryOperator &I, ExecutionContext &SF) {
|
||||
const Type *Ty = I.getOperand(0)->getType();
|
||||
GenericValue Src = getOperandValue(I.getOperand(0), SF);
|
||||
GenericValue Dest;
|
||||
switch (Ty->getPrimitiveID()) {
|
||||
IMPLEMENT_UNARY_OPERATOR(~, UByte);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, SByte);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, UShort);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, Short);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, UInt);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, Int);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, ULong);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, Long);
|
||||
IMPLEMENT_UNARY_OPERATOR(~, Pointer);
|
||||
default:
|
||||
cout << "Unhandled type for Not instruction: " << Ty << "\n";
|
||||
}
|
||||
SetValue(&I, Dest, SF);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Binary Instruction Implementations
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -1184,7 +1156,6 @@ bool Interpreter::executeInstruction() {
|
||||
executeBinaryInst(cast<BinaryOperator>(I), SF);
|
||||
} else {
|
||||
switch (I.getOpcode()) {
|
||||
case Instruction::Not: executeNotInst(cast<UnaryOperator>(I),SF); break;
|
||||
// Terminators
|
||||
case Instruction::Ret: executeRetInst (cast<ReturnInst>(I), SF); break;
|
||||
case Instruction::Br: executeBrInst (cast<BranchInst>(I), SF); break;
|
||||
|
@ -365,12 +365,6 @@ void MutateStructTypes::transformFunction(Function *m) {
|
||||
case Instruction::Invoke:
|
||||
assert(0 && "Insn not implemented!");
|
||||
|
||||
// Unary Instructions
|
||||
case Instruction::Not:
|
||||
NewI = UnaryOperator::create((Instruction::UnaryOps)I.getOpcode(),
|
||||
ConvertValue(I.getOperand(0)));
|
||||
break;
|
||||
|
||||
// Binary Instructions
|
||||
case Instruction::Add:
|
||||
case Instruction::Sub:
|
||||
|
Loading…
Reference in New Issue
Block a user