/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - DalvOps.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Puts the given opcode into the table of all ops. * * @param opcode {@code non-null;} the opcode */ private static void set(Dop opcode) { int idx = opcode.getOpcode() - Opcodes.MIN_VALUE; DOPS[idx] = opcode; } }
/** * Helper method to get an extended (16-bit) opcode out of an * instruction, returning it as a code unit. The opcode * <i>must</i> be an extended opcode. * * @param insn {@code non-null;} the instruction containing the * extended opcode * @return the opcode as a code unit */ protected static short opcodeUnit(DalvInsn insn) { int opcode = insn.getOpcode().getOpcode(); if ((opcode < 0x100) || (opcode > 0xffff)) { throw new IllegalArgumentException("opcode out of range 0..65535"); } return (short) opcode; }
/** * Helper method to combine an opcode and a second byte of data into * the appropriate form for emitting into a code buffer. * * @param insn {@code non-null;} the instruction containing the opcode * @param arg {@code 0..255;} arbitrary other byte value * @return combined value */ protected static short opcodeUnit(DalvInsn insn, int arg) { if ((arg & 0xff) != arg) { throw new IllegalArgumentException("arg out of range 0..255"); } int opcode = insn.getOpcode().getOpcode(); if ((opcode & 0xff) != opcode) { throw new IllegalArgumentException("opcode out of range 0..255"); } return (short) (opcode | (arg << 8)); }
/** * Helper method to combine an opcode and a second byte of data into * the appropriate form for emitting into a code buffer. * * @param insn {@code non-null;} the instruction containing the opcode * @param arg {@code 0..255;} arbitrary other byte value * @return combined value */ protected static short opcodeUnit(DalvInsn insn, int arg) { if ((arg & 0xff) != arg) { throw new IllegalArgumentException("arg out of range 0..255"); } int opcode = insn.getOpcode().getOpcode(); if ((opcode & 0xff) != opcode) { throw new IllegalArgumentException("opcode out of range 0..255"); } return (short) (opcode | (arg << 8)); }
/** * Helper method to get an extended (16-bit) opcode out of an * instruction, returning it as a code unit. The opcode * <i>must</i> be an extended opcode. * * @param insn {@code non-null;} the instruction containing the * extended opcode * @return the opcode as a code unit */ protected static short opcodeUnit(DalvInsn insn) { int opcode = insn.getOpcode().getOpcode(); if ((opcode < 0xff) || (opcode > 0xffff)) { throw new IllegalArgumentException( "extended opcode out of range 255..65535"); } return (short) opcode; }
/** * Helper method to get an extended (16-bit) opcode out of an * instruction, returning it as a code unit. The opcode * <i>must</i> be an extended opcode. * * @param insn {@code non-null;} the instruction containing the * extended opcode * @return the opcode as a code unit */ protected static short opcodeUnit(DalvInsn insn) { int opcode = insn.getOpcode().getOpcode(); if ((opcode < 0x100) || (opcode > 0xffff)) { throw new IllegalArgumentException("opcode out of range 0..65535"); } return (short) opcode; }
/** * Helper method to get an extended (16-bit) opcode out of an * instruction, returning it as a code unit. The opcode * <i>must</i> be an extended opcode. * * @param insn {@code non-null;} the instruction containing the * extended opcode * @return the opcode as a code unit */ protected static short opcodeUnit(DalvInsn insn) { int opcode = insn.getOpcode().getOpcode(); if ((opcode < 0x100) || (opcode > 0xffff)) { throw new IllegalArgumentException("opcode out of range 0..65535"); } return (short) opcode; }
/** * Helper method to combine an opcode and a second byte of data into * the appropriate form for emitting into a code buffer. * * @param insn {@code non-null;} the instruction containing the opcode * @param arg {@code 0..255;} arbitrary other byte value * @return combined value */ protected static short opcodeUnit(DalvInsn insn, int arg) { if ((arg & 0xff) != arg) { throw new IllegalArgumentException("arg out of range 0..255"); } int opcode = insn.getOpcode().getOpcode(); if ((opcode & 0xff) != opcode) { throw new IllegalArgumentException("opcode out of range 0..255"); } return (short) (opcode | (arg << 8)); }
/** * Helper method to combine an opcode and a second byte of data into * the appropriate form for emitting into a code buffer. * * @param insn {@code non-null;} the instruction containing the opcode * @param arg {@code 0..255;} arbitrary other byte value * @return combined value */ protected static short opcodeUnit(DalvInsn insn, int arg) { if ((arg & 0xff) != arg) { throw new IllegalArgumentException("arg out of range 0..255"); } int opcode = insn.getOpcode().getOpcode(); if ((opcode & 0xff) != opcode) { throw new IllegalArgumentException("opcode out of range 0..255"); } return (short) (opcode | (arg << 8)); }
/** * Helper method to get an extended (16-bit) opcode out of an * instruction, returning it as a code unit. The opcode * <i>must</i> be an extended opcode. * * @param insn {@code non-null;} the instruction containing the * extended opcode * @return the opcode as a code unit */ protected static short opcodeUnit(DalvInsn insn) { int opcode = insn.getOpcode().getOpcode(); if ((opcode < 0xff) || (opcode > 0xffff)) { throw new IllegalArgumentException( "extended opcode out of range 255..65535"); } return (short) opcode; }
/** * Helper method to get an extended (16-bit) opcode out of an * instruction, returning it as a code unit. The opcode * <i>must</i> be an extended opcode. * * @param insn {@code non-null;} the instruction containing the * extended opcode * @return the opcode as a code unit */ protected static short opcodeUnit(DalvInsn insn) { int opcode = insn.getOpcode().getOpcode(); if ((opcode < 0xff) || (opcode > 0xffff)) { throw new IllegalArgumentException( "extended opcode out of range 255..65535"); } return (short) opcode; }
/** * Helper method to combine an opcode and a second byte of data into * the appropriate form for emitting into a code buffer. * * @param insn {@code non-null;} the instruction containing the opcode * @param arg {@code 0..255;} arbitrary other byte value * @return combined value */ protected static short opcodeUnit(DalvInsn insn, int arg) { if ((arg & 0xff) != arg) { throw new IllegalArgumentException("arg out of range 0..255"); } int opcode = insn.getOpcode().getOpcode(); if ((opcode & 0xff) != opcode) { throw new IllegalArgumentException("opcode out of range 0..255"); } return (short) (opcode | (arg << 8)); }
/** * Helper method to combine an opcode and a second byte of data into * the appropriate form for emitting into a code buffer. * * @param insn {@code non-null;} the instruction containing the opcode * @param arg {@code 0..255;} arbitrary other byte value * @return combined value */ protected static short opcodeUnit(DalvInsn insn, int arg) { if ((arg & 0xff) != arg) { throw new IllegalArgumentException("arg out of range 0..255"); } int opcode = insn.getOpcode().getOpcode(); if ((opcode & 0xff) != opcode) { throw new IllegalArgumentException("opcode out of range 0..255"); } return (short) (opcode | (arg << 8)); }