Package org.jakstab.asm

Examples of org.jakstab.asm.Operand


public class CallDecoder extends InstructionDecoder {
    public CallDecoder(String name, int addrMode1, int operandType1) {
        super(name, addrMode1, operandType1);
    }
    protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
        Operand operand = getOperand1(bytesArray, operandSize, addrSize);
        int size = byteIndex - instrStartIndex;
        return factory.newCallInstruction(name, operand, size, prefixes);
    }
View Full Code Here


      super(name, addrMode1, operandType1, addrMode2, operandType2);
      this.rtlOperation = rtlOperation;
   }

   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
      int size = byteIndex - instrStartIndex;
      return factory.newArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
   }
View Full Code Here

   public SSEMoveDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
      super(name, addrMode1, operandType1, addrMode2, operandType2);
   }

   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
      int size = byteIndex - instrStartIndex;
      return factory.newMoveInstruction(name, op1, op2, size, 0);
   }
View Full Code Here

   public ArithmeticDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int addrMode3, int operandType3, Operation rtlOperation) {
      super(name, addrMode1, operandType1, addrMode2, operandType2, addrMode3, operandType3);
      this.rtlOperation = rtlOperation;
   }
   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
      Operand op3 = getOperand3(bytesArray, operandSize, addrSize);
      int size = byteIndex - instrStartIndex;
      return factory.newArithmeticInstruction(name, rtlOperation, op1, op2, op3, size, prefixes);
   }
View Full Code Here

      super(name, addrMode1, operandType1, addrMode2, operandType2);
      this.rtlOperation = rtlOperation;
   }

   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
      int size = byteIndex - instrStartIndex;
      return factory.newFPArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
   }
View Full Code Here

  public FPInstructionDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
    super(name, addrMode1, operandType1, addrMode2, operandType2);
  }

  protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
    Operand op1 = getOperand1(bytesArray, operandSize, addrSize);

    if (byteIndex <= instrStartIndex + 1) {
      logger.warn("Adjusting instruction size of float instruction " + name);
      byteIndex = instrStartIndex + 2;
    }
View Full Code Here

public class JmpDecoder extends InstructionDecoder {
    public JmpDecoder(String name, int addrMode1, int operandType1) {
        super(name, addrMode1, operandType1);
    }
    protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
        Operand operand = getOperand1(bytesArray, operandSize, addrSize);
        int size = byteIndex - instrStartIndex;
        return factory.newJmpInstruction(name, operand, size, prefixes);
    }
View Full Code Here

   }
   public RetDecoder(String name, int addrMode1, int operandType1) {
      super(name, addrMode1, operandType1);
   }
   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
      assert(op1 == null || op1 instanceof Immediate) : "Operand should be immediate Value!";
      int size = byteIndex - instrStartIndex;
      return factory.newRetInstruction(name, (Immediate)op1, size, prefixes);
   }
View Full Code Here

   public ConditionalJmpDecoder(String name, int addrMode1, int operandType1) {
      super(name, addrMode1, operandType1);
   }

   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand addr = getOperand1(bytesArray, operandSize, addrSize);
      assert(addr instanceof X86PCRelativeAddress) : "Address should be PC Relative!";
      return factory.newCondJmpInstruction(name, (X86PCRelativeAddress)addr, byteIndex-instrStartIndex, prefixes);
   }
View Full Code Here

   FPLoadDecoder(String name, int addrMode1, int operandType1) {
      super(name, addrMode1, operandType1);
   }

   protected Instruction decodeInstruction(BinaryInputBuffer bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
      Operand op = getOperand1(bytesArray, operandSize, addrSize);
      int size = byteIndex - instrStartIndex;
      return factory.newFPLoadInstruction(name, op, size, prefixes);
   }
View Full Code Here

TOP

Related Classes of org.jakstab.asm.Operand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.