/** * Mutate the argument instruction into an instruction of the Unary instruction format having the * specified operator and operands. * * @param i the instruction to mutate * @param o the instruction's operator * @param Result the instruction's Result operand * @param Val the instruction's Val operand * @return the mutated instruction */ public static Instruction mutate(Instruction i, Operator o, RegisterOperand Result, Operand Val) { if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Unary"); i.operator = o; i.putOperand(0, Result); i.putOperand(1, Val); return i; }
/** * Mutate the argument instruction into an instruction of the MIR_Store instruction format having * the specified operator and operands. * * @param i the instruction to mutate * @param o the instruction's operator * @param Value the instruction's Value operand * @param Address the instruction's Address operand * @param Offset the instruction's Offset operand * @return the mutated instruction */ public static Instruction mutate( Instruction i, Operator o, RegisterOperand Value, RegisterOperand Address, Operand Offset) { if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_Store"); i.operator = o; i.putOperand(0, Value); i.putOperand(1, Address); i.putOperand(2, Offset); i.putOperand(3, null); i.putOperand(4, null); return i; }
/** * Mutate the argument instruction into an instruction of the StoreCheck instruction format having * the specified operator and operands. * * @param i the instruction to mutate * @param o the instruction's operator * @param GuardResult the instruction's GuardResult operand * @param Ref the instruction's Ref operand * @param Val the instruction's Val operand * @param Guard the instruction's Guard operand * @return the mutated instruction */ public static Instruction mutate( Instruction i, Operator o, RegisterOperand GuardResult, Operand Ref, Operand Val, Operand Guard) { if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "StoreCheck"); i.operator = o; i.putOperand(0, GuardResult); i.putOperand(1, Ref); i.putOperand(2, Val); i.putOperand(3, Guard); return i; }
/** * Mutate the argument instruction into an instruction of the InlineGuard instruction format * having the specified operator and operands. * * @param i the instruction to mutate * @param o the instruction's operator * @param Value the instruction's Value operand * @param Guard the instruction's Guard operand * @param Goal the instruction's Goal operand * @param Target the instruction's Target operand * @param BranchProfile the instruction's BranchProfile operand * @return the mutated instruction */ public static Instruction mutate( Instruction i, Operator o, Operand Value, Operand Guard, Operand Goal, BranchOperand Target, BranchProfileOperand BranchProfile) { if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "InlineGuard"); i.operator = o; i.putOperand(0, Value); i.putOperand(1, Guard); i.putOperand(2, Goal); i.putOperand(3, Target); i.putOperand(4, BranchProfile); return i; }
/** * Mutate the argument instruction into an instruction of the Attempt instruction format having * the specified operator and operands. * * @param i the instruction to mutate * @param o the instruction's operator * @param Result the instruction's Result operand * @param Address the instruction's Address operand * @param Offset the instruction's Offset operand * @param OldValue the instruction's OldValue operand * @param NewValue the instruction's NewValue operand * @param Location the instruction's Location operand * @return the mutated instruction */ public static Instruction mutate( Instruction i, Operator o, RegisterOperand Result, Operand Address, Operand Offset, Operand OldValue, Operand NewValue, LocationOperand Location) { if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Attempt"); i.resizeNumberOfOperands(7); i.operator = o; i.putOperand(0, Result); i.putOperand(1, Address); i.putOperand(2, Offset); i.putOperand(3, OldValue); i.putOperand(4, NewValue); i.putOperand(5, Location); i.putOperand(6, null); return i; }
/** * Mutate the argument instruction into an instruction of the Label instruction format having the * specified operator and operands. * * @param i the instruction to mutate * @param o the instruction's operator * @param Block the instruction's Block operand * @return the mutated instruction */ public static Instruction mutate(Instruction i, Operator o, BasicBlockOperand Block) { if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Label"); i.operator = o; i.putOperand(0, Block); return i; }