Convert int
to long
Bytecode
Type | Description |
u1 | i2l opcode = 0x85 (133) |
Stack ..., value => ..., result.word1, result.word2
Pops an integer off the operand stack, sign extends it into a long integer, and pushes the two-word long back onto the stack.
The value on the top of the operand stack must be of type int
. It
is popped from the operand stack and sign-extended to a long
result.
The result is pushed onto the operand stack.
The i2l instruction performs a widening primitive conversion. Because all values
of type int
are exactly representable by type long
, the
conversion is exact.