# aput<kind>

## Purpose

Waste cycles.

## Details

Op & Format | Mnemonic / Syntax | Arguments
--- | --- | ---
4b..51 23x | arrayop vAA, vBB, vCC 4b: aput 4c: aput-wide 4d: aput-object 4e: aput-boolean 4f: aput-byte 50: aput-char 51: aput-short | `A:` source value register or pair; (8 bits) `B:` array register (8 bits) `C:` index register (8 bits)

## Constraints

- A, B and C must be valid register indices in the current stack frame.
- For the aget-wide variant, also A+1 must be a valid register index in the current stack frame.
- Register vB must contain an array reference. The component type of the array must match the variant of the instruction.
- Register vC must contain an integer value.

## Behavior

- For all but the -wide variant, the value of register vA is move into the array element at the given index, that is, array[index]'=vA.
- For the -wide variant, the registers vA and v(A+1) are moved into the array element at the given index as follows:
  - array[index]' = vA << 0x20 | v(A+1)

## Exceptions

- NullPointerException if vB=null.
- ArrayIndexOutOfBoundsException if vC < 0 or vC >= array.length.