load a reference onto the stack from a local variable #index
aload_0
2a
0010 1010
→ objectref
load a reference onto the stack from local variable 0
aload_1
2b
0010 1011
→ objectref
load a reference onto the stack from local variable 1
aload_2
2c
0010 1100
→ objectref
load a reference onto the stack from local variable 2
aload_3
2d
0010 1101
→ objectref
load a reference onto the stack from local variable 3
anewarray
bd
1011 1101
2: indexbyte1, indexbyte2
count → arrayref
create a new array of references of length count and component type identified by the class reference index (indexbyte1 << 8 | indexbyte2) in the constant pool
areturn
b0
1011 0000
objectref → [empty]
return a reference from a method
arraylength
be
1011 1110
arrayref → length
get the length of an array
astore
3a
0011 1010
1: index
objectref →
store a reference into a local variable #index
astore_0
4b
0100 1011
objectref →
store a reference into local variable 0
astore_1
4c
0100 1100
objectref →
store a reference into local variable 1
astore_2
4d
0100 1101
objectref →
store a reference into local variable 2
astore_3
4e
0100 1110
objectref →
store a reference into local variable 3
athrow
bf
1011 1111
objectref → [empty], objectref
throws an error or exception (notice that the rest of the stack is cleared, leaving only a reference to the Throwable)
baload
33
0011 0011
arrayref, index → value
load a byte or Boolean value from an array
bastore
54
0101 0100
arrayref, index, value →
store a byte or Boolean value into an array
bipush
10
0001 0000
1: byte
→ value
push a byte onto the stack as an integer value
breakpoint
ca
1100 1010
reserved for breakpoints in Java debuggers; should not appear in any class file
caload
34
0011 0100
arrayref, index → value
load a char from an array
castore
55
0101 0101
arrayref, index, value →
store a char into an array
checkcast
c0
1100 0000
2: indexbyte1, indexbyte2
objectref → objectref
checks whether an objectref is of a certain type, the class reference of which is in the constant pool at index (indexbyte1 << 8 | indexbyte2)
insert a copy of the top value into the stack two (if value2 is double or long it takes up the entry of value3, too) or three values (if value2 is neither double nor long) from the top
goes to another instruction at branchoffset (signed int constructed from unsigned bytes branchbyte1 << 24 | branchbyte2 << 16 | branchbyte3 << 8 | branchbyte4)
i2b
91
1001 0001
value → result
convert an int into a byte
i2c
92
1001 0010
value → result
convert an int into a character
i2d
87
1000 0111
value → result
convert an int into a double
i2f
86
1000 0110
value → result
convert an int into a float
i2l
85
1000 0101
value → result
convert an int into a long
i2s
93
1001 0011
value → result
convert an int into a short
iadd
60
0110 0000
value1, value2 → result
add two ints
iaload
2e
0010 1110
arrayref, index → value
load an int from an array
iand
7e
0111 1110
value1, value2 → result
perform a bitwise AND on two integers
iastore
4f
0100 1111
arrayref, index, value →
store an int into an array
iconst_m1
02
0000 0010
→ -1
load the int value −1 onto the stack
iconst_0
03
0000 0011
→ 0
load the int value 0 onto the stack
iconst_1
04
0000 0100
→ 1
load the int value 1 onto the stack
iconst_2
05
0000 0101
→ 2
load the int value 2 onto the stack
iconst_3
06
0000 0110
→ 3
load the int value 3 onto the stack
iconst_4
07
0000 0111
→ 4
load the int value 4 onto the stack
iconst_5
08
0000 1000
→ 5
load the int value 5 onto the stack
idiv
6c
0110 1100
value1, value2 → result
divide two integers
if_acmpeq
a5
1010 0101
2: branchbyte1, branchbyte2
value1, value2 →
if references are equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_acmpne
a6
1010 0110
2: branchbyte1, branchbyte2
value1, value2 →
if references are not equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_icmpeq
9f
1001 1111
2: branchbyte1, branchbyte2
value1, value2 →
if ints are equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_icmpge
a2
1010 0010
2: branchbyte1, branchbyte2
value1, value2 →
if value1 is greater than or equal to value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_icmpgt
a3
1010 0011
2: branchbyte1, branchbyte2
value1, value2 →
if value1 is greater than value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_icmple
a4
1010 0100
2: branchbyte1, branchbyte2
value1, value2 →
if value1 is less than or equal to value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_icmplt
a1
1010 0001
2: branchbyte1, branchbyte2
value1, value2 →
if value1 is less than value2, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
if_icmpne
a0
1010 0000
2: branchbyte1, branchbyte2
value1, value2 →
if ints are not equal, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifeq
99
1001 1001
2: branchbyte1, branchbyte2
value →
if value is 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifge
9c
1001 1100
2: branchbyte1, branchbyte2
value →
if value is greater than or equal to 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifgt
9d
1001 1101
2: branchbyte1, branchbyte2
value →
if value is greater than 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifle
9e
1001 1110
2: branchbyte1, branchbyte2
value →
if value is less than or equal to 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
iflt
9b
1001 1011
2: branchbyte1, branchbyte2
value →
if value is less than 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifne
9a
1001 1010
2: branchbyte1, branchbyte2
value →
if value is not 0, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifnonnull
c7
1100 0111
2: branchbyte1, branchbyte2
value →
if value is not null, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
ifnull
c6
1100 0110
2: branchbyte1, branchbyte2
value →
if value is null, branch to instruction at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
iinc
84
1000 0100
2: index, const
[No change]
increment local variable #index by signed byte const
iload
15
0001 0101
1: index
→ value
load an int value from a local variable #index
iload_0
1a
0001 1010
→ value
load an int value from local variable 0
iload_1
1b
0001 1011
→ value
load an int value from local variable 1
iload_2
1c
0001 1100
→ value
load an int value from local variable 2
iload_3
1d
0001 1101
→ value
load an int value from local variable 3
impdep1
fe
1111 1110
reserved for implementation-dependent operations within debuggers; should not appear in any class file
impdep2
ff
1111 1111
reserved for implementation-dependent operations within debuggers; should not appear in any class file
imul
68
0110 1000
value1, value2 → result
multiply two integers
ineg
74
0111 0100
value → result
negate int
instanceof
c1
1100 0001
2: indexbyte1, indexbyte2
objectref → result
determines if an object objectref is of a given type, identified by class reference index in constant pool (indexbyte1 << 8 | indexbyte2)
invokedynamic
ba
1011 1010
4: indexbyte1, indexbyte2, 0, 0
[arg1, arg2, ...] → result
invokes a dynamic method and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
invokeinterface
b9
1011 1001
4: indexbyte1, indexbyte2, count, 0
objectref, [arg1, arg2, ...] → result
invokes an interface method on object objectref and puts the result on the stack (might be void); the interface method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
invokespecial
b7
1011 0111
2: indexbyte1, indexbyte2
objectref, [arg1, arg2, ...] → result
invoke instance method on object objectref and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
invokestatic
b8
1011 1000
2: indexbyte1, indexbyte2
[arg1, arg2, ...] → result
invoke a static method and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
invokevirtual
b6
1011 0110
2: indexbyte1, indexbyte2
objectref, [arg1, arg2, ...] → result
invoke virtual method on object objectref and puts the result on the stack (might be void); the method is identified by method reference index in constant pool (indexbyte1 << 8 | indexbyte2)
jump to subroutine at branchoffset (signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2) and place the return address on the stack
jump to subroutine at branchoffset (signed int constructed from unsigned bytes branchbyte1 << 24 | branchbyte2 << 16 | branchbyte3 << 8 | branchbyte4) and place the return address on the stack
push 0 if the two longs are the same, 1 if value1 is greater than value2, -1 otherwise
lconst_0
09
0000 1001
→ 0L
push 0L (the number zero with type long) onto the stack
lconst_1
0a
0000 1010
→ 1L
push 1L (the number one with type long) onto the stack
ldc
12
0001 0010
1: index
→ value
push a constant #index from a constant pool (String, int, float, Class, java.lang.invoke.MethodType, java.lang.invoke.MethodHandle, or a dynamically-computed constant) onto the stack
ldc_w
13
0001 0011
2: indexbyte1, indexbyte2
→ value
push a constant #index from a constant pool (String, int, float, Class, java.lang.invoke.MethodType, java.lang.invoke.MethodHandle, or a dynamically-computed constant) onto the stack (wide index is constructed as indexbyte1 << 8 | indexbyte2)
ldc2_w
14
0001 0100
2: indexbyte1, indexbyte2
→ value
push a constant #index from a constant pool (double, long, or a dynamically-computed constant) onto the stack (wide index is constructed as indexbyte1 << 8 | indexbyte2)
a target address is looked up from a table using a key and execution continues from the instruction at that address
lor
81
1000 0001
value1, value2 → result
bitwise OR of two longs
lrem
71
0111 0001
value1, value2 → result
remainder of division of two longs
lreturn
ad
1010 1101
value → [empty]
return a long value
lshl
79
0111 1001
value1, value2 → result
bitwise shift left of a long value1 by int value2 positions
lshr
7b
0111 1011
value1, value2 → result
bitwise shift right of a long value1 by int value2 positions
lstore
37
0011 0111
1: index
value →
store a long value in a local variable #index
lstore_0
3f
0011 1111
value →
store a long value in a local variable 0
lstore_1
40
0100 0000
value →
store a long value in a local variable 1
lstore_2
41
0100 0001
value →
store a long value in a local variable 2
lstore_3
42
0100 0010
value →
store a long value in a local variable 3
lsub
65
0110 0101
value1, value2 → result
subtract two longs
lushr
7d
0111 1101
value1, value2 → result
bitwise shift right of a long value1 by int value2 positions, unsigned
lxor
83
1000 0011
value1, value2 → result
bitwise XOR of two longs
monitorenter
c2
1100 0010
objectref →
enter monitor for object ("grab the lock" – start of synchronized() section)
monitorexit
c3
1100 0011
objectref →
exit monitor for object ("release the lock" – end of synchronized() section)
multianewarray
c5
1100 0101
3: indexbyte1, indexbyte2, dimensions
count1, [count2,...] → arrayref
create a new array of dimensions dimensions of type identified by class reference in constant pool index (indexbyte1 << 8 | indexbyte2); the sizes of each dimension is identified by count1, [count2, etc.]
new
bb
1011 1011
2: indexbyte1, indexbyte2
→ objectref
create new object of type identified by class reference in constant pool index (indexbyte1 << 8 | indexbyte2)
newarray
bc
1011 1100
1: atype
count → arrayref
create new array with count elements of primitive type identified by atype
nop
00
0000 0000
[No change]
perform no operation
pop
57
0101 0111
value →
discard the top value on the stack
pop2
58
0101 1000
{value2, value1} →
discard the top two values on the stack (or one value, if it is a double or long)
putfield
b5
1011 0101
2: indexbyte1, indexbyte2
objectref, value →
set field to value in an object objectref, where the field is identified by a field reference index in constant pool (indexbyte1 << 8 | indexbyte2)
putstatic
b3
1011 0011
2: indexbyte1, indexbyte2
value →
set static field to value in a class, where the field is identified by a field reference index in constant pool (indexbyte1 << 8 | indexbyte2)
continue execution from an address in the table at offset index
wide
c4
1100 0100
3/5: opcode, indexbyte1, indexbyte2 or iinc, indexbyte1, indexbyte2, countbyte1, countbyte2
[same as for corresponding instructions]
execute opcode, where opcode is either iload, fload, aload, lload, dload, istore, fstore, astore, lstore, dstore, or ret, but assume the index is 16 bit; or execute iinc, where the index is 16 bits and the constant to increment by is a signed 16 bit short
(no name)
cb-fd
these values are currently unassigned for opcodes and are reserved for future use
†Deprecated in Java 7 (major class version 51).[2] They will not appear in class files generated from a compiler newer than that. ret is not explicitly deprecated, but useless without the jsr and jsr_w opcodes.
See also
Jazelle DBX (Direct Bytecode eXecution), a feature that executes some Java bytecodes in hardware, on some ARM9 CPUs