wide <instruction> <parameter> [<parameter>]Note that the Jasmin assembler automatically widens instructions as necessary - so the wide instruction is optional in Jasmin.
Stack
Before
Description
After
...
...
wide is placed in front of an instruction that accesses a local variable. You use it to extend the range of local variables available to the instruction from 8 bits (i.e. 0-255) to 16 bits (i.e. 0-65535). In addition, for iinc, it increases the increment range. wide is used in conjunction with one of the following opcodes: aload, dload, iload, fload, lload, astore, dstore, istore, fstore, lstore, iinc and ret. See the reference pages of those instructions for more details.
Bytecode
There are two bytecode formats. For aload, dload, iload, fload, lload, astore, dstore, istore, fstore, lstore, and ret, use:
Type
|
Description
|
| u1
|
wide
opcode = 0xC4 (196)
|
| u1
|
<opcode>
|
| u2
|
<varnum>
|
Type
|
Description
|
| u1
|
wide
opcode = 0xC4 (196)
|
| u1
|
<opcode>
|
| u2
|
<varnum>
|
| u2
|
<n>
|
aload, iload, fload, dload, lload, astore, istore, fstore, dstore, lstore, iinc, ret
Notes
The opcode that follows wide cannot be the target of a branch.