lload <varnum> or wide lload <varnum>In the first form, <varnum> is an unsigned integer in the range 0 to 0xFF. In the second (wide) form, <varnum> is an unsigned integer in the range 0 to 0xFFFE.
Stack
Before
Description
After
...
resultword1
resultword2
...
lload retrieves a long integer held in a local variable and pushes it onto the operand stack.
Since long integers are 64bits wide, and each local variable only holds up to 32 bits, Java uses two consecutive local variables, <varnum> and <varnum> + 1 to store a long. So lload <varnum> actually places the values of both <varnum> and <varnum> + 1 onto the operand stack.
Both <varnum> and <varnum> + 1 must be valid local variable numbers in the current frame, and together they must be holding a long.
Remember that attempting to treat twoword values as two independent singleword values will produce a verification error. So trying to retrieve either <varnum> or <varnum> + 1 independently (e.g. using iload <varnum>) will produce a verification error. Similarly, if you store a nonlong value in <varnum>, then <varnum> + 1 becomes invalidated until a new value is stored in it.
Example
lconst_1 ; push the long integer 1 onto the stack lstore 3 ; pop 1 off of the stack and store in local variables 3 and 4 lload 3 ; push the value from local variables 3 and 4 (the long integer 1) ; back onto the stackBytecode
For local variable numbers in the range 0255, use:
Type

Description

u1

lload
opcode = 0x16 (22)

u1

<varnum>

Type

Description

u1

wide
opcode = 0xC4 (196)

u1

lload
opcode = 0x16 (22)

u2

<varnum>

fload, iload, dload