private DecodedInstruction decodeRawInsn(ShortArrayCodeInput in) throws EOFException { int opcodeUnit = in.read(); int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit); OpcodeInfo.Info opcodeInfo; try { opcodeInfo = OpcodeInfo.get(opcode); } catch (IllegalArgumentException e) { LOG.warn("Ignore decode error: '{}', replace with NOP instruction", e.getMessage()); opcodeInfo = OpcodeInfo.NOP; } return opcodeInfo.getFormat().decode(opcodeUnit, in); }
/** * Gets the opcode name. * * @return {@code non-null;} the opcode name */ public String getName() { return OpcodeInfo.getName(opcode); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = nibble2(opcodeUnit); int b = nibble3(opcodeUnit); int index = in.read(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new TwoRegisterDecodedInstruction( this, opcode, index, indexType, 0, 0L, a, b); }
/** * Decodes an instruction from the given input source. */ public static DecodedInstruction decode(CodeInput in) throws EOFException { int opcodeUnit = in.read(); int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit); InstructionCodec format = OpcodeInfo.getFormat(opcode); return format.decode(opcodeUnit, in); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int index = in.readInt(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new OneRegisterDecodedInstruction( this, opcode, index, indexType, 0, 0L, a); }
/** * Decodes an instruction from the given input source. */ public static DecodedInstruction decode(CodeInput in) throws EOFException { int opcodeUnit = in.read(); int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit); InstructionCodec format = OpcodeInfo.getFormat(opcode); return format.decode(opcodeUnit, in); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int index = in.read(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new OneRegisterDecodedInstruction( this, opcode, index, indexType, 0, 0L, a); }
/** * Gets the name of the given opcode. */ public static String getName(int opcode) { return get(opcode).getName(); }
/** * Gets the opcode name. * * @return {@code non-null;} the opcode name */ public String getName() { return OpcodeInfo.getName(opcode); }
/** * Decodes an instruction from the given input source. */ public static DecodedInstruction decode(CodeInput in) throws EOFException { int opcodeUnit = in.read(); int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit); InstructionCodec format = OpcodeInfo.getFormat(opcode); return format.decode(opcodeUnit, in); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int index = in.read(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new OneRegisterDecodedInstruction( this, opcode, index, indexType, 0, 0L, a); }
/** * Gets the name of the given opcode. */ public static String getName(int opcode) { return get(opcode).getName(); }
/** * Gets the opcode name. * * @return {@code non-null;} the opcode name */ public String getName() { return OpcodeInfo.getName(opcode); }
/** * Decodes an instruction from the given input source. */ public static DecodedInstruction decode(CodeInput in) throws EOFException { int opcodeUnit = in.read(); int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit); InstructionCodec format = OpcodeInfo.getFormat(opcode); return format.decode(opcodeUnit, in); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int index = in.readInt(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new OneRegisterDecodedInstruction( this, opcode, index, indexType, 0, 0L, a); }
/** * Gets the format (an {@link InstructionCodec}) for the given opcode * value. */ public static InstructionCodec getFormat(int opcode) { return get(opcode).getFormat(); }
/** * Gets the opcode name. * * @return {@code non-null;} the opcode name */ public String getName() { return OpcodeInfo.getName(opcode); }
/** * Decodes an instruction from the given input source. */ public static DecodedInstruction decode(CodeInput in) throws EOFException { int opcodeUnit = in.read(); int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit); InstructionCodec format = OpcodeInfo.getFormat(opcode); return format.decode(opcodeUnit, in); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int index = in.read(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new OneRegisterDecodedInstruction( this, opcode, index, indexType, 0, 0L, a); }
/** * Gets the name of the given opcode. */ public static String getName(int opcode) { return get(opcode).getName(); }