public static int extractOpcodeFromUnit(int opcodeUnit) {
    /*
     * Note: This method bakes in knowledge that all opcodes are
     * either single-byte or of the forms (byteValue << 8) or
     * ((byteValue << 8) | 0xff).
     */

    int lowByte = opcodeUnit & 0xff;
    return ((lowByte == 0) || (lowByte == 0xff)) ? opcodeUnit : lowByte;
  }
Gets the opcode out of an opcode unit, the latter of which may also include one or more
argument values.

@param opcodeUnit the opcode-containing code unit
@return the extracted opcode
android/android_framework/dex-maker/src/main/java/com/android/dx/io/Opcodes.java