# iget<kind>

## Purpose

Perform the identified object instance field operation with the identified field, loading or storing into the value register.

Note: These opcodes are reasonable candidates for static linking, altering the field argument to be a more direct offset.

## Details

Op & Format | Mnemonic / Syntax | Arguments
--- | --- | ---
52..58 22c | iinstanceop vA, vB, field@CCCC 52: iget 53: iget-wide 54: iget-object 55: iget-boolean 56: iget-byte 57: iget-char 58: iget-short | `A:` dest value register or pair; (4 bits) `B:` object register (4 bits) `C:` instance field reference index (16 bits)

## Constraints

- A and B must be valid register indices in the current stackframe.
- For the -wide variant, also A+1 must be a valid register index in the current stackframe.
- Register vB must contain an object reference.
- C must be a valid index into the field reference pool.
- The field must be an instance field. The type of the field denoted by C must match the variant of the instruction.

## Behavior

- The value of the given instance field is read from the given object and moved into the given register vA, that is, vA'=<object>.<field>.
- If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined.
- For all but the -wide variant, if v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.
- For the -wide variant, if v(A+2) is the upper half of a register pair, v(A+2)' becomes undefined.

## Exceptions

- NullPointerException if object is null.
- IllegalAccessException if <object>.<field> is not visible from the current context according to the usual visibility and access rules of the Java programming language.