예제 #1
0
 /**
  * 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;
 }
예제 #2
0
 /**
  * Create an instruction of the MIR_Store instruction format.
  *
  * @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 newly created MIR_Store instruction
  */
 public static Instruction create(
     Operator o, RegisterOperand Value, RegisterOperand Address, Operand Offset) {
   if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "MIR_Store");
   Instruction i = new Instruction(o, 5);
   i.putOperand(0, Value);
   i.putOperand(1, Address);
   i.putOperand(2, Offset);
   return i;
 }
예제 #3
0
 /**
  * Create an instruction of the StoreCheck instruction format.
  *
  * @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 newly created StoreCheck instruction
  */
 public static Instruction create(
     Operator o, RegisterOperand GuardResult, Operand Ref, Operand Val, Operand Guard) {
   if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "StoreCheck");
   Instruction i = new Instruction(o, 5);
   i.putOperand(0, GuardResult);
   i.putOperand(1, Ref);
   i.putOperand(2, Val);
   i.putOperand(3, Guard);
   return i;
 }
예제 #4
0
 /**
  * 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;
 }
예제 #5
0
 /**
  * Create an instruction of the InlineGuard instruction format.
  *
  * @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 newly created InlineGuard instruction
  */
 public static Instruction create(
     Operator o,
     Operand Value,
     Operand Guard,
     Operand Goal,
     BranchOperand Target,
     BranchProfileOperand BranchProfile) {
   if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "InlineGuard");
   Instruction i = new Instruction(o, 5);
   i.putOperand(0, Value);
   i.putOperand(1, Guard);
   i.putOperand(2, Goal);
   i.putOperand(3, Target);
   i.putOperand(4, BranchProfile);
   return i;
 }
예제 #6
0
 /**
  * Create an instruction of the Attempt instruction format.
  *
  * @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 newly created Attempt instruction
  */
 public static Instruction create(
     Operator o,
     RegisterOperand Result,
     Operand Address,
     Operand Offset,
     Operand OldValue,
     Operand NewValue,
     LocationOperand Location) {
   if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Attempt");
   Instruction i = new Instruction(o, 7);
   i.putOperand(0, Result);
   i.putOperand(1, Address);
   i.putOperand(2, Offset);
   i.putOperand(3, OldValue);
   i.putOperand(4, NewValue);
   i.putOperand(5, Location);
   return i;
 }
예제 #7
0
  /**
   * 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;
  }
예제 #8
0
 /**
  * Set the operand called Ref in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Ref the operand to store
  */
 public static void setRef(Instruction i, Operand Ref) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "StoreCheck");
   i.putOperand(1, Ref);
 }
예제 #9
0
 /**
  * Set the operand called Value in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Value the operand to store
  */
 public static void setValue(Instruction i, Operand Value) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "InlineGuard");
   i.putOperand(0, Value);
 }
예제 #10
0
 /**
  * Set the operand called BranchProfile in the argument instruction to the argument operand. The
  * operand will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param BranchProfile the operand to store
  */
 public static void setBranchProfile(Instruction i, BranchProfileOperand BranchProfile) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "InlineGuard");
   i.putOperand(4, BranchProfile);
 }
예제 #11
0
 /**
  * Set the operand called Target in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Target the operand to store
  */
 public static void setTarget(Instruction i, BranchOperand Target) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "InlineGuard");
   i.putOperand(3, Target);
 }
예제 #12
0
 /**
  * Set the operand called Goal in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Goal the operand to store
  */
 public static void setGoal(Instruction i, Operand Goal) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "InlineGuard");
   i.putOperand(2, Goal);
 }
예제 #13
0
 /**
  * Set the operand called NewValue in the argument instruction to the argument operand. The
  * operand will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param NewValue the operand to store
  */
 public static void setNewValue(Instruction i, Operand NewValue) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Attempt");
   i.putOperand(4, NewValue);
 }
예제 #14
0
 /**
  * Set the operand called Block in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Block the operand to store
  */
 public static void setBlock(Instruction i, BasicBlockOperand Block) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Label");
   i.putOperand(0, Block);
 }
예제 #15
0
 /**
  * Set the operand called GuardResult in the argument instruction to the argument operand. The
  * operand will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param GuardResult the operand to store
  */
 public static void setGuardResult(Instruction i, RegisterOperand GuardResult) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "StoreCheck");
   i.putOperand(0, GuardResult);
 }
예제 #16
0
 /**
  * Set the operand called Location in the argument instruction to the argument operand. The
  * operand will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Location the operand to store
  */
 public static void setLocation(Instruction i, LocationOperand Location) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_Store");
   i.putOperand(3, Location);
 }
예제 #17
0
 /**
  * Set the operand called Offset in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Offset the operand to store
  */
 public static void setOffset(Instruction i, Operand Offset) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_Store");
   i.putOperand(2, Offset);
 }
예제 #18
0
 /**
  * Set the operand called Address in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Address the operand to store
  */
 public static void setAddress(Instruction i, RegisterOperand Address) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_Store");
   i.putOperand(1, Address);
 }
예제 #19
0
 /**
  * Set the operand called Guard in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Guard the operand to store
  */
 public static void setGuard(Instruction i, Operand Guard) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "StoreCheck");
   i.putOperand(3, Guard);
 }
예제 #20
0
 /**
  * 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;
 }
예제 #21
0
 /**
  * Set the operand called Address in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Address the operand to store
  */
 public static void setAddress(Instruction i, Operand Address) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Attempt");
   i.putOperand(1, Address);
 }
예제 #22
0
 /**
  * Set the operand called Val in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Val the operand to store
  */
 public static void setVal(Instruction i, Operand Val) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Unary");
   i.putOperand(1, Val);
 }
예제 #23
0
 /**
  * Set the operand called Value in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Value the operand to store
  */
 public static void setValue(Instruction i, RegisterOperand Value) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "MIR_Store");
   i.putOperand(0, Value);
 }
예제 #24
0
 /**
  * Set the operand called Result in the argument instruction to the argument operand. The operand
  * will now point to the argument instruction as its containing instruction.
  *
  * @param i the instruction in which to store the operand
  * @param Result the operand to store
  */
 public static void setResult(Instruction i, RegisterOperand Result) {
   if (Configuration.ExtremeAssertions && !conforms(i)) fail(i, "Unary");
   i.putOperand(0, Result);
 }
예제 #25
0
 /**
  * Create an instruction of the Label instruction format.
  *
  * @param o the instruction's operator
  * @param Block the instruction's Block operand
  * @return the newly created Label instruction
  */
 public static Instruction create(Operator o, BasicBlockOperand Block) {
   if (Configuration.ExtremeAssertions && !conforms(o)) fail(o, "Label");
   Instruction i = new Instruction(o, 5);
   i.putOperand(0, Block);
   return i;
 }