prev next contents
iconst_m1

push the integer constant -1

Jasmin Syntax


    iconst_m1

Stack

Before

After
...
-1

...
Description

This instruction pushes the int -1 onto the operand stack.

Bytecode

Type

Description
u1
iconst_m1 opcode = 0x02 (2)
See Also

bipush, sipush, ldc, ldc_w, ldc2_w, aconst_null, iconst_<n>, lconst_<l>, fconst_<f>, dconst_<d>

Notes

You could also use bipush -1, sipush -1 or ldc -1 to achieve the same effect, although iconst_m1 is typically more efficient and uses fewer bytes in the bytecode.


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates