protected Instruction decodeInstruction( byte[] 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.newShiftInstruction(name, rtlOperation, op1, (ImmediateOrRegister) op2, size, 0); }
public Instruction decode( byte[] bytesArray, int index, int instrStartIndex, int segmentOverride, int prefixes, X86InstructionFactory factory) { this.byteIndex = index; this.instrStartIndex = instrStartIndex; this.prefixes = prefixes; int ModRM = readByte(bytesArray, byteIndex); int rm = ModRM & 7; FPInstructionDecoder instrDecoder = null; instrDecoder = floatGRPMap[number][rm]; Instruction instr = null; if (instrDecoder != null) { instr = instrDecoder.decode( bytesArray, byteIndex, instrStartIndex, segmentOverride, prefixes, factory); byteIndex = instrDecoder.getCurrentIndex(); } else { instr = factory.newIllegalInstruction(); } return instr; }
protected Instruction decodeInstruction( byte[] 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.newGeneralInstruction(name, op1, op2, op3, size, prefixes); }