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
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/InsnFormat.java