@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.baseAddressForCursor() - 1; // already read opcode int size = in.read(); int firstKey = in.readInt(); int[] targets = new int[size]; for (int i = 0; i < size; i++) { targets[i] = baseAddress + in.readInt(); } return new PackedSwitchPayloadDecodedInstruction( this, opcodeUnit, firstKey, targets); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int target = (short) in.read(); // sign-extend return new OneRegisterDecodedInstruction( this, opcode, 0, null, baseAddress + target, 0L, a); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int target = baseAddress + in.readInt(); /* * Switch instructions need to "forward" their addresses to their * payload target instructions. */ switch (opcode) { case Opcodes.PACKED_SWITCH: case Opcodes.SPARSE_SWITCH: { in.setBaseAddress(target, baseAddress); break; } } return new OneRegisterDecodedInstruction( this, opcode, 0, null, target, 0L, a); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int literal = byte1(opcodeUnit); // should be zero int target = in.readInt(); return new ZeroRegisterDecodedInstruction( this, opcode, 0, null, baseAddress + target, literal); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int elementWidth = in.read(); int size = in.readInt(); for (int i = 0, value = 0; i < size; i++, even = !even) { if (even) { value = in.read(); short[] array = new short[size]; for (int i = 0; i < size; i++) { array[i] = (short) in.read(); int[] array = new int[size]; for (int i = 0; i < size; i++) { array[i] = in.readInt(); long[] array = new long[size]; for (int i = 0; i < size; i++) { array[i] = in.readLong();
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { // Note: We use the literal field to hold the decoded AA value. int index = in.readInt(); int literal = in.read(); return new ZeroRegisterDecodedInstruction( this, opcodeUnit, index, IndexType.VARIES, 0, literal); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int literal = byte1(opcodeUnit); // should be zero int a = in.read(); int b = in.read(); return new TwoRegisterDecodedInstruction( this, opcode, 0, null, 0, literal, a, b); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); long literal = in.readLong(); return new OneRegisterDecodedInstruction( this, opcode, 0, null, 0, literal, a); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int literal = in.readInt(); return new OneRegisterDecodedInstruction( this, opcode, 0, null, 0, literal, a); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int target = (byte) byte1(opcodeUnit); // sign-extend return new ZeroRegisterDecodedInstruction( this, opcode, 0, null, baseAddress + target, 0L); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int elementWidth = in.read(); int size = in.readInt(); for (int i = 0, value = 0; i < size; i++, even = !even) { if (even) { value = in.read(); short[] array = new short[size]; for (int i = 0; i < size; i++) { array[i] = (short) in.read(); int[] array = new int[size]; for (int i = 0; i < size; i++) { array[i] = in.readInt(); long[] array = new long[size]; for (int i = 0; i < size; i++) { array[i] = in.readLong();
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { // Note: We use the literal field to hold the decoded AA value. int index = in.readInt(); int literal = in.read(); return new ZeroRegisterDecodedInstruction( this, opcodeUnit, index, IndexType.VARIES, 0, literal); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int literal = byte1(opcodeUnit); // should be zero int target = in.readInt(); return new ZeroRegisterDecodedInstruction( this, opcode, 0, null, baseAddress + target, literal); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int b = in.read(); return new TwoRegisterDecodedInstruction( this, opcode, 0, null, 0, 0L, a, b); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); long literal = in.readLong(); return new OneRegisterDecodedInstruction( this, opcode, 0, null, 0, literal, a); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int literal = in.readInt(); return new OneRegisterDecodedInstruction( this, opcode, 0, null, 0, literal, a); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int target = (byte) byte1(opcodeUnit); // sign-extend return new ZeroRegisterDecodedInstruction( this, opcode, 0, null, baseAddress + target, 0L); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.baseAddressForCursor() - 1; // already read opcode int size = in.read(); int firstKey = in.readInt(); int[] targets = new int[size]; for (int i = 0; i < size; i++) { targets[i] = baseAddress + in.readInt(); } return new PackedSwitchPayloadDecodedInstruction( this, opcodeUnit, firstKey, targets); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int literal = byte1(opcodeUnit); // should be zero int target = (short) in.read(); // sign-extend return new ZeroRegisterDecodedInstruction( this, opcode, 0, null, baseAddress + target, literal); }
@Override public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException { int baseAddress = in.cursor() - 1; int opcode = byte0(opcodeUnit); int a = byte1(opcodeUnit); int target = baseAddress + in.readInt(); /* * Switch instructions need to "forward" their addresses to their * payload target instructions. */ switch (opcode) { case Opcodes.PACKED_SWITCH: case Opcodes.SPARSE_SWITCH: { in.setBaseAddress(target, baseAddress); break; } } return new OneRegisterDecodedInstruction( this, opcode, 0, null, target, 0L, a); }