# sget<kind>

## Purpose

Perform the identified object static field operation with the identified static 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
--- | --- | ---
60..6d 21c | sstaticop vAA, field@BBBB 60: sget 61: sget-wide 62: sget-object 63: sget-boolean 64: sget-byte 65: sget-char 66: sget-short | `A:` dest value register or pair; (8 bits) `B:` static field reference index (16 bits)

## Constraints

- A must be a valid register index in the current stackframe.
- For the -wide variant, also A+1 must be a valid register index in the current stackframe.
- B must be a valid index into the field reference pool.
- The field denoted by B must be static. The type of the field denoted by B 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'=<class>.<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.