List of Java bytecode instructions: Difference between revisions

Content deleted Content added
Tzofias (talk | contribs)
m Updated the different invokes descriptions
BattyBot (talk | contribs)
top: Fixed reference date error(s) (see CS1 errors: dates for details) and AWB general fixes
 
(46 intermediate revisions by 38 users not shown)
Line 1:
{{Short description|none}} <!-- This short description is INTENTIONALLY "none" - please see WP:SDNONE before you consider changing it! -->
{{Main|Java bytecode}}
 
This is a list of the instructions that make up the [[Java bytecode]], an abstract machine language that is ultimately executed by the [[Java virtual machine]].<ref>{{cite web|url=https://docs.oracle.com/javase/specs/jvms/se24/html/index.html |title=The Java® Virtual Machine Specification – Java SE 24 Edition |access-date=July 26, 2025}}</ref> The Java bytecode is generated byfrom languagelanguages compilersrunning targetingon the [[Java Platform]], most notably the [[Java (programming language)|Java programming language]].
 
''Note that any referenced "value" refers to a 32-bit int as per the Java instruction set.''
 
{| class="wikitable sortable"
|-
! scope="col" | Mnemonic
! scope="col" | Opcode<br>''(in [[hexadecimal|hex]])''
!Opcode (in binary)
! scope="col" | Other bytes<br>[count]: [operand labels]
! scope="col" | Stack<br>[before]→[after]
! scope="col" class="unsortable" | Description
|-
|aaload
|data-sort-value=50|32
|32
|0011 0010
|
Line 20 ⟶ 23:
|-
|aastore
|data-sort-value=83|53
|53
|0101 0011
|
|arrayref, index, value →
|store into a reference in an array
|-
|aconst_null
|data-sort-value=1|01
|01
|0000 0001
|
Line 34 ⟶ 37:
|-
|aload
|data-sort-value=25|19
|19
|0001 1001
|1: index
Line 41 ⟶ 44:
|-
|aload_0
|data-sort-value=42|2a
|2a
|0010 1010
|
Line 48 ⟶ 51:
|-
|aload_1
|data-sort-value=43|2b
|2b
|0010 1011
|
Line 55 ⟶ 58:
|-
|aload_2
|data-sort-value=44|2c
|2c
|0010 1100
|
Line 62 ⟶ 65:
|-
|aload_3
|data-sort-value=45|2d
|2d
|0010 1101
|
Line 69 ⟶ 72:
|-
|anewarray
|data-sort-value=189|bd
|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'' (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}}) in the constant pool
|-
|areturn
|data-sort-value=176|b0
|b0
|1011 0000
|
Line 83 ⟶ 86:
|-
|arraylength
|data-sort-value=190|be
|be
|1011 1110
|
Line 90 ⟶ 93:
|-
|astore
|data-sort-value=58|3a
|3a
|0011 1010
|1: index
Line 97 ⟶ 100:
|-
|astore_0
|data-sort-value=75|4b
|4b
|0100 1011
|
Line 104 ⟶ 107:
|-
|astore_1
|data-sort-value=76|4c
|4c
|0100 1100
|
Line 111 ⟶ 114:
|-
|astore_2
|data-sort-value=77|4d
|4d
|0100 1101
|
Line 118 ⟶ 121:
|-
|astore_3
|data-sort-value=78|4e
|4e
|0100 1110
|
Line 125 ⟶ 128:
|-
|athrow
|data-sort-value=191|bf
|bf
|1011 1111
|
Line 132 ⟶ 135:
|-
|baload
|data-sort-value=51|33
|33
|0011 0011
|
Line 139 ⟶ 142:
|-
|bastore
|data-sort-value=84|54
|54
|0101 0100
|
Line 146 ⟶ 149:
|-
|bipush
|data-sort-value=16|10
|10
|0001 0000
|1: byte
Line 153 ⟶ 156:
|-
|breakpoint
|data-sort-value=202|ca
|ca
|1100 1010
|
Line 160 ⟶ 163:
|-
|caload
|data-sort-value=52|34
|34
|0011 0100
|
Line 167 ⟶ 170:
|-
|castore
|data-sort-value=85|55
|55
|0101 0101
|
Line 174 ⟶ 177:
|-
|checkcast
|data-sort-value=192|c0
|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'' (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|d2f
|data-sort-value=144|90
|90
|1001 0000
|
|value → result
|convert a [[Double-precision floating-point format|double]] to a [[Single-precision floating-point format|float]]
|-
|d2i
|data-sort-value=142|8e
|8e
|1000 1110
|
Line 195 ⟶ 198:
|-
|d2l
|data-sort-value=143|8f
|8f
|1000 1111
|
Line 202 ⟶ 205:
|-
|dadd
|data-sort-value=99|63
|63
|0110 0011
|
Line 209 ⟶ 212:
|-
|daload
|data-sort-value=49|31
|31
|0011 0001
|
Line 216 ⟶ 219:
|-
|dastore
|data-sort-value=82|52
|52
|0101 0010
|
Line 223 ⟶ 226:
|-
|dcmpg
|data-sort-value=152|98
|98
|1001 1000
|
|value1, value2 → result
|compare two doubles, 1 on NaN
|-
|dcmpl
|data-sort-value=151|97
|97
|1001 0111
|
|value1, value2 → result
|compare two doubles, -1 on NaN
|-
|dconst_0
|data-sort-value=14|0e
|0e
|0000 1110
|
|→ 0.0
|push the constant ''0.0'' (a ''double'') onto the stack
|-
|dconst_1
|data-sort-value=15|0f
|0f
|0000 1111
|
|→ 1.0
|push the constant ''1.0'' (a ''double'') onto the stack
|-
|ddiv
|data-sort-value=111|6f
|6f
|0110 1111
|
Line 258 ⟶ 261:
|-
|dload
|data-sort-value=24|18
|18
|0001 1000
|1: index
Line 265 ⟶ 268:
|-
|dload_0
|data-sort-value=38|26
|26
|0010 0110
|
Line 272 ⟶ 275:
|-
|dload_1
|data-sort-value=39|27
|27
|0010 0111
|
Line 279 ⟶ 282:
|-
|dload_2
|data-sort-value=40|28
|28
|0010 1000
|
Line 286 ⟶ 289:
|-
|dload_3
|data-sort-value=41|29
|29
|0010 1001
|
Line 293 ⟶ 296:
|-
|dmul
|data-sort-value=107|6b
|6b
|0110 1011
|
Line 300 ⟶ 303:
|-
|dneg
|data-sort-value=119|77
|77
|0111 0111
|
Line 307 ⟶ 310:
|-
|drem
|data-sort-value=115|73
|73
|0111 0011
|
Line 314 ⟶ 317:
|-
|dreturn
|data-sort-value=175|af
|af
|1010 1111
|
Line 321 ⟶ 324:
|-
|dstore
|data-sort-value=57|39
|39
|0011 1001
|1: index
Line 328 ⟶ 331:
|-
|dstore_0
|data-sort-value=71|47
|47
|0100 0111
|
Line 335 ⟶ 338:
|-
|dstore_1
|data-sort-value=72|48
|48
|0100 1000
|
Line 342 ⟶ 345:
|-
|dstore_2
|data-sort-value=73|49
|49
|0100 1001
|
Line 349 ⟶ 352:
|-
|dstore_3
|data-sort-value=74|4a
|4a
|0100 1010
|
Line 356 ⟶ 359:
|-
|dsub
|data-sort-value=103|67
|67
|0110 0111
|
Line 363 ⟶ 366:
|-
|dup
|data-sort-value=89|59
|59
|0101 1001
|
Line 370 ⟶ 373:
|-
|dup_x1
|data-sort-value=90|5a
|5a
|0101 1010
|
Line 377 ⟶ 380:
|-
|dup_x2
|data-sort-value=91|5b
|5b
|0101 1011
|
Line 384 ⟶ 387:
|-
|dup2
|data-sort-value=92|5c
|5c
|0101 1100
|
Line 391 ⟶ 394:
|-
|dup2_x1
|data-sort-value=93|5d
|5d
|0101 1101
|
Line 398 ⟶ 401:
|-
|dup2_x2
|data-sort-value=94|5e
|5e
|0101 1110
|
Line 405 ⟶ 408:
|-
|f2d
|data-sort-value=141|8d
|8d
|1000 1101
|
Line 412 ⟶ 415:
|-
|f2i
|data-sort-value=139|8b
|8b
|1000 1011
|
Line 419 ⟶ 422:
|-
|f2l
|data-sort-value=140|8c
|8c
|1000 1100
|
Line 426 ⟶ 429:
|-
|fadd
|data-sort-value=98|62
|62
|0110 0010
|
Line 433 ⟶ 436:
|-
|faload
|data-sort-value=48|30
|30
|0011 0000
|
Line 440 ⟶ 443:
|-
|fastore
|data-sort-value=81|51
|51
|0101 0001
|
Line 447 ⟶ 450:
|-
|fcmpg
|data-sort-value=150|96
|96
|1001 0110
|
|value1, value2 → result
|compare two floats, 1 on NaN
|-
|fcmpl
|data-sort-value=149|95
|95
|1001 0101
|
|value1, value2 → result
|compare two floats, -1 on NaN
|-
|fconst_0
|data-sort-value=11|0b
|0b
|0000 1011
|
Line 468 ⟶ 471:
|-
|fconst_1
|data-sort-value=12|0c
|0c
|0000 1100
|
Line 475 ⟶ 478:
|-
|fconst_2
|data-sort-value=13|0d
|0d
|0000 1101
|
Line 482 ⟶ 485:
|-
|fdiv
|data-sort-value=110|6e
|6e
|0110 1110
|
Line 489 ⟶ 492:
|-
|fload
|data-sort-value=23|17
|17
|0001 0111
|1: index
Line 496 ⟶ 499:
|-
|fload_0
|data-sort-value=34|22
|22
|0010 0010
|
Line 503 ⟶ 506:
|-
|fload_1
|data-sort-value=35|23
|23
|0010 0011
|
Line 510 ⟶ 513:
|-
|fload_2
|data-sort-value=36|24
|24
|0010 0100
|
Line 517 ⟶ 520:
|-
|fload_3
|data-sort-value=37|25
|25
|0010 0101
|
Line 524 ⟶ 527:
|-
|fmul
|data-sort-value=106|6a
|6a
|0110 1010
|
Line 531 ⟶ 534:
|-
|fneg
|data-sort-value=118|76
|76
|0111 0110
|
Line 538 ⟶ 541:
|-
|frem
|data-sort-value=114|72
|72
|0111 0010
|
Line 545 ⟶ 548:
|-
|freturn
|data-sort-value=174|ae
|ae
|1010 1110
|
Line 552 ⟶ 555:
|-
|fstore
|data-sort-value=56|38
|38
|0011 1000
|1: index
Line 559 ⟶ 562:
|-
|fstore_0
|data-sort-value=67|43
|43
|0100 0011
|
Line 566 ⟶ 569:
|-
|fstore_1
|data-sort-value=68|44
|44
|0100 0100
|
Line 573 ⟶ 576:
|-
|fstore_2
|data-sort-value=69|45
|45
|0100 0101
|
Line 580 ⟶ 583:
|-
|fstore_3
|data-sort-value=70|46
|46
|0100 0110
|
Line 587 ⟶ 590:
|-
|fsub
|data-sort-value=102|66
|66
|0110 0110
|
Line 594 ⟶ 597:
|-
|getfield
|data-sort-value=180|b4
|b4
|1011 0100
|2: index1indexbyte1, index2indexbyte2
|objectref → value
|get a field ''value'' of an object ''objectref'', where the field is identified by field reference in the constant pool ''index'' (''index1{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} index2''indexbyte2}})
|-
|getstatic
|data-sort-value=178|b2
|b2
|1011 0010
|2: index1indexbyte1, index2indexbyte2
|→ value
|get a static field ''value'' of a class, where the field is identified by field reference in the constant pool ''index'' (''index1{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} index2''indexbyte2}})
|-
|goto
|data-sort-value=167|a7
|a7
|1010 0111
|2: branchbyte1, branchbyte2
|[no change]
|goes to another instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|goto_w
|data-sort-value=200|c8
|c8
|1100 1000
|4: branchbyte1, branchbyte2, branchbyte3, branchbyte4
|[no change]
|goes to another instruction at ''branchoffset'' (signed int constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 24 +{{pipe}} ''branchbyte2 &lt;&lt; 16 +{{pipe}} ''branchbyte3 &lt;&lt; 8 +{{pipe}} branchbyte4''}})
|-
|i2b
|data-sort-value=145|91
|91
|1001 0001
|
Line 629 ⟶ 632:
|-
|i2c
|data-sort-value=146|92
|92
|1001 0010
|
Line 636 ⟶ 639:
|-
|i2d
|data-sort-value=135|87
|87
|1000 0111
|
Line 643 ⟶ 646:
|-
|i2f
|data-sort-value=134|86
|86
|1000 0110
|
Line 650 ⟶ 653:
|-
|i2l
|data-sort-value=133|85
|85
|1000 0101
|
Line 657 ⟶ 660:
|-
|i2s
|data-sort-value=147|93
|93
|1001 0011
|
Line 664 ⟶ 667:
|-
|iadd
|data-sort-value=96|60
|60
|0110 0000
|
Line 671 ⟶ 674:
|-
|iaload
|data-sort-value=46|2e
|2e
|0010 1110
|
Line 678 ⟶ 681:
|-
|iand
|data-sort-value=126|7e
|7e
|0111 1110
|
|value1, value2 → result
|perform a bitwise andAND on two integers
|-
|iastore
|data-sort-value=79|4f
|4f
|0100 1111
|
Line 692 ⟶ 695:
|-
|iconst_m1
|data-sort-value=2|02
|02
|0000 0010
|
|→ -1
|load the int value -1−1 onto the stack
|-
|iconst_0
|data-sort-value=3|03
|03
|0000 0011
|
Line 706 ⟶ 709:
|-
|iconst_1
|data-sort-value=4|04
|04
|0000 0100
|
Line 713 ⟶ 716:
|-
|iconst_2
|data-sort-value=5|05
|05
|0000 0101
|
Line 720 ⟶ 723:
|-
|iconst_3
|data-sort-value=6|06
|06
|0000 0110
|
Line 727 ⟶ 730:
|-
|iconst_4
|data-sort-value=7|07
|07
|0000 0111
|
Line 734 ⟶ 737:
|-
|iconst_5
|data-sort-value=8|08
|08
|0000 1000
|
Line 741 ⟶ 744:
|-
|idiv
|data-sort-value=108|6c
|6c
|0110 1100
|
Line 748 ⟶ 751:
|-
|if_acmpeq
|data-sort-value=165|a5
|a5
|1010 0101
|2: branchbyte1, branchbyte2
|value1, value2 →
|if references are equal, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_acmpne
|data-sort-value=166|a6
|a6
|1010 0110
|2: branchbyte1, branchbyte2
|value1, value2 →
|if references are not equal, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_icmpeq
|data-sort-value=159|9f
|9f
|1001 1111
|2: branchbyte1, branchbyte2
|value1, value2 →
|if ints are equal, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_icmpge
|data-sort-value=162|a2
|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 ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_icmpgt
|data-sort-value=163|a3
|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 ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_icmple
|data-sort-value=164|a4
|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 ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_icmplt
|data-sort-value=161|a1
|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 ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|if_icmpne
|data-sort-value=160|a0
|a0
|1010 0000
|2: branchbyte1, branchbyte2
|value1, value2 →
|if ints are not equal, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifeq
|data-sort-value=153|99
|99
|1001 1001
|2: branchbyte1, branchbyte2
|value →
|if ''value'' is 0, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifge
|data-sort-value=156|9c
|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 ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifgt
|data-sort-value=157|9d
|9d
|1001 1101
|2: branchbyte1, branchbyte2
|value →
|if ''value'' is greater than 0, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifle
|data-sort-value=158|9e
|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 ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|iflt
|data-sort-value=155|9b
|9b
|1001 1011
|2: branchbyte1, branchbyte2
|value →
|if ''value'' is less than 0, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifne
|data-sort-value=154|9a
|9a
|1001 1010
|2: branchbyte1, branchbyte2
|value →
|if ''value'' is not 0, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifnonnull
|data-sort-value=199|c7
|c7
|1100 0111
|2: branchbyte1, branchbyte2
|value →
|if ''value'' is not null, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|ifnull
|data-sort-value=198|c6
|c6
|1100 0110
|2: branchbyte1, branchbyte2
|value →
|if ''value'' is null, branch to instruction at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}})
|-
|iinc
|data-sort-value=132|84
|84
|1000 0100
|2: index, const
Line 867 ⟶ 870:
|-
|iload
|data-sort-value=21|15
|15
|0001 0101
|1: index
Line 874 ⟶ 877:
|-
|iload_0
|data-sort-value=26|1a
|1a
|0001 1010
|
Line 881 ⟶ 884:
|-
|iload_1
|data-sort-value=27|1b
|1b
|0001 1011
|
Line 888 ⟶ 891:
|-
|iload_2
|data-sort-value=28|1c
|1c
|0001 1100
|
Line 895 ⟶ 898:
|-
|iload_3
|data-sort-value=29|1d
|1d
|0001 1101
|
Line 902 ⟶ 905:
|-
|impdep1
|data-sort-value=254|fe
|fe
|1111 1110
|
Line 909 ⟶ 912:
|-
|impdep2
|data-sort-value=255|ff
|ff
|1111 1111
|
Line 916 ⟶ 919:
|-
|imul
|data-sort-value=104|68
|68
|0110 1000
|
Line 923 ⟶ 926:
|-
|ineg
|data-sort-value=116|74
|74
|0111 0100
|
Line 930 ⟶ 933:
|-
|instanceof
|data-sort-value=193|c1
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|invokedynamic
|data-sort-value=186|ba
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|invokeinterface
|data-sort-value=185|b9
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|invokespecial
|data-sort-value=183|b7
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|invokestatic
|data-sort-value=184|b8
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|invokevirtual
|data-sort-value=182|b6
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|ior
|data-sort-value=128|80
|80
|1000 0000
|
|value1, value2 → result
|bitwise int orOR
|-
|irem
|data-sort-value=112|70
|70
|0111 0000
|
Line 986 ⟶ 989:
|-
|ireturn
|data-sort-value=172|ac
|ac
|1010 1100
|
Line 993 ⟶ 996:
|-
|ishl
|data-sort-value=120|78
|78
|0111 1000
|
Line 1,000 ⟶ 1,003:
|-
|ishr
|data-sort-value=122|7a
|7a
|0111 1010
|
Line 1,007 ⟶ 1,010:
|-
|istore
|data-sort-value=54|36
|36
|0011 0110
|1: index
Line 1,014 ⟶ 1,017:
|-
|istore_0
|data-sort-value=59|3b
|3b
|0011 1011
|
Line 1,021 ⟶ 1,024:
|-
|istore_1
|data-sort-value=60|3c
|3c
|0011 1100
|
Line 1,028 ⟶ 1,031:
|-
|istore_2
|data-sort-value=61|3d
|3d
|0011 1101
|
Line 1,035 ⟶ 1,038:
|-
|istore_3
|data-sort-value=62|3e
|3e
|0011 1110
|
Line 1,042 ⟶ 1,045:
|-
|isub
|data-sort-value=100|64
|64
|0110 0100
|
Line 1,049 ⟶ 1,052:
|-
|iushr
|data-sort-value=124|7c
|7c
|0111 1100
|
Line 1,056 ⟶ 1,059:
|-
|ixor
|data-sort-value=130|82
|82
|1000 0010
|
Line 1,062 ⟶ 1,065:
|int xor
|-
|jsr{{ref |Deprecated|†}}
|jsr
|data-sort-value=168|a8
|a8
|1010 1000
|2: branchbyte1, branchbyte2
|→ address
|jump to subroutine at ''branchoffset'' (signed short constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 8 +{{pipe}} branchbyte2''}}) and place the return address on the stack
|-
|jsr_w{{ref |Deprecated|†}}
|data-sort-value=201|c9
|c9
|1100 1001
|4: branchbyte1, branchbyte2, branchbyte3, branchbyte4
|→ address
|jump to subroutine at ''branchoffset'' (signed int constructed from unsigned bytes ''{{mono|branchbyte1 &lt;&lt; 24 +{{pipe}} branchbyte2 &lt;&lt; 16 +{{pipe}} branchbyte3 &lt;&lt; 8 +{{pipe}} branchbyte4''}}) and place the return address on the stack
|-
|l2d
|data-sort-value=138|8a
|8a
|1000 1010
|
Line 1,084 ⟶ 1,087:
|-
|l2f
|data-sort-value=137|89
|89
|1000 1001
|
Line 1,091 ⟶ 1,094:
|-
|l2i
|data-sort-value=136|88
|88
|1000 1000
|
Line 1,098 ⟶ 1,101:
|-
|ladd
|data-sort-value=97|61
|61
|0110 0001
|
Line 1,105 ⟶ 1,108:
|-
|laload
|data-sort-value=47|2f
|2f
|0010 1111
|
Line 1,112 ⟶ 1,115:
|-
|land
|data-sort-value=127|7f
|7f
|0111 1111
|
|value1, value2 → result
|[[bitwise andoperation|bitwise]] AND of two longs
|-
|lastore
|data-sort-value=80|50
|50
|0101 0000
|
Line 1,126 ⟶ 1,129:
|-
|lcmp
|data-sort-value=148|94
|94
|1001 0100
|
|value1, value2 → result
|push 0 if the two longs are the same, 1 if value1 is greater than value2, -1 otherwise
|compare two longs values
|-
|lconst_0
|data-sort-value=9|09
|09
|0000 1001
|
|→ 0L
|push ''0L'' (the longnumber 0[[zero]] with type ''long'') onto the stack
|-
|lconst_1
|data-sort-value=10|0a
|0a
|0000 1010
|
|→ 1L
|push ''1L'' (the longnumber 1[[one]] with type ''long'') onto the stack
|-
|ldc
|data-sort-value=18|12
|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 floata dynamically-computed constant) onto the stack
|-
|ldc_w
|data-sort-value=19|13
|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 floata dynamically-computed constant) onto the stack (wide ''index'' is constructed as ''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|ldc2_w
|data-sort-value=20|14
|14
|0001 0100
|2: indexbyte1, indexbyte2
|→ value
|push a constant ''#index'' from a constant pool (double, long, or longa dynamically-computed constant) onto the stack (wide ''index'' is constructed as ''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|ldiv
|data-sort-value=109|6d
|6d
|0110 1101
|
Line 1,175 ⟶ 1,178:
|-
|lload
|data-sort-value=22|16
|16
|0001 0110
|1: index
Line 1,182 ⟶ 1,185:
|-
|lload_0
|data-sort-value=30|1e
|1e
|0001 1110
|
Line 1,189 ⟶ 1,192:
|-
|lload_1
|data-sort-value=31|1f
|1f
|0001 1111
|
Line 1,196 ⟶ 1,199:
|-
|lload_2
|data-sort-value=32|20
|20
|0010 0000
|
Line 1,203 ⟶ 1,206:
|-
|lload_3
|data-sort-value=33|21
|21
|0010 0001
|
Line 1,210 ⟶ 1,213:
|-
|lmul
|data-sort-value=105|69
|69
|0110 1001
|
Line 1,217 ⟶ 1,220:
|-
|lneg
|data-sort-value=117|75
|75
|0111 0101
|
Line 1,224 ⟶ 1,227:
|-
|lookupswitch
|data-sort-value=171|ab
|ab
|1010 1011
|48+: &lt;0-30–3 bytes padding&gt;, defaultbyte1, defaultbyte2, defaultbyte3, defaultbyte4, npairs1, npairs2, npairs3, npairs4, match-offset pairs...
|key →
|a target address is looked up from a table using a key and execution continues from the instruction at that address
|-
|lor
|data-sort-value=129|81
|81
|1000 0001
|
|value1, value2 → result
|bitwise orOR of two longs
|-
|lrem
|data-sort-value=113|71
|71
|0111 0001
|
Line 1,245 ⟶ 1,248:
|-
|lreturn
|data-sort-value=173|ad
|ad
|1010 1101
|
Line 1,252 ⟶ 1,255:
|-
|lshl
|data-sort-value=121|79
|79
|0111 1001
|
Line 1,259 ⟶ 1,262:
|-
|lshr
|data-sort-value=123|7b
|7b
|0111 1011
|
Line 1,266 ⟶ 1,269:
|-
|lstore
|data-sort-value=55|37
|37
|0011 0111
|1: index
Line 1,273 ⟶ 1,276:
|-
|lstore_0
|data-sort-value=63|3f
|3f
|0011 1111
|
Line 1,280 ⟶ 1,283:
|-
|lstore_1
|data-sort-value=64|40
|40
|0100 0000
|
Line 1,287 ⟶ 1,290:
|-
|lstore_2
|data-sort-value=65|41
|41
|0100 0001
|
Line 1,294 ⟶ 1,297:
|-
|lstore_3
|data-sort-value=66|42
|42
|0100 0010
|
Line 1,301 ⟶ 1,304:
|-
|lsub
|data-sort-value=101|65
|65
|0110 0101
|
Line 1,308 ⟶ 1,311:
|-
|lushr
|data-sort-value=125|7d
|7d
|0111 1101
|
Line 1,315 ⟶ 1,318:
|-
|lxor
|data-sort-value=131|83
|83
|1000 0011
|
|value1, value2 → result
|bitwise exclusive orXOR of two longs
|-
|monitorenter
|data-sort-value=194|c2
|c2
|1100 0010
|
|objectref →
|enter monitor for object ("grab the lock" - start of synchronized() section)
|-
|monitorexit
|data-sort-value=195|c3
|c3
|1100 0011
|
|objectref →
|exit monitor for object ("release the lock" - end of synchronized() section)
|-
|multianewarray
|data-sort-value=197|c5
|c5
|1100 0101
|3: indexbyte1, indexbyte2, dimensions
|count1, [count2,...] → arrayref
|create a new array of ''dimensions'' dimensions with elements of type identified by class reference in constant pool ''index'' (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}}); the sizes of each dimension is identified by ''count1'', [''count2'', etc.]
|-
|new
|data-sort-value=187|bb
|bb
|1011 1011
|2: indexbyte1, indexbyte2
|→ objectref
|create new object of type identified by class reference in constant pool ''index'' (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|newarray
|data-sort-value=188|bc
|bc
|1011 1100
|1: atype
Line 1,357 ⟶ 1,360:
|-
|nop
|data-sort-value=0|00
|00
|0000 0000
|
Line 1,364 ⟶ 1,367:
|-
|pop
|data-sort-value=87|57
|57
|0101 0111
|
Line 1,371 ⟶ 1,374:
|-
|pop2
|data-sort-value=88|58
|58
|0101 1000
|
Line 1,378 ⟶ 1,381:
|-
|putfield
|data-sort-value=181|b5
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|putstatic
|data-sort-value=179|b3
|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 (''{{mono|indexbyte1 &lt;&lt; 8 +{{pipe}} indexbyte2''}})
|-
|ret{{ref |Deprecated|†}}
|ret
|data-sort-value=169|a9
|a9
|1010 1001
|1: index
Line 1,399 ⟶ 1,402:
|-
|return
|data-sort-value=177|b1
|b1
|1011 0001
|
Line 1,406 ⟶ 1,409:
|-
|saload
|data-sort-value=53|35
|35
|0011 0101
|
Line 1,413 ⟶ 1,416:
|-
|sastore
|data-sort-value=86|56
|56
|0101 0110
|
Line 1,420 ⟶ 1,423:
|-
|sipush
|data-sort-value=17|11
|11
|0001 0001
|2: byte1, byte2
|→ value
|push a short onto the stack as an integer ''value''
|-
|swap
|data-sort-value=95|5f
|5f
|0101 1111
|
Line 1,434 ⟶ 1,437:
|-
|tableswitch
|data-sort-value=170|aa
|aa
|1010 1010
|416+: [0-30–3 bytes padding], defaultbyte1, defaultbyte2, defaultbyte3, defaultbyte4, lowbyte1, lowbyte2, lowbyte3, lowbyte4, highbyte1, highbyte2, highbyte3, highbyte4, jump offsets...
|index →
|continue execution from an address in the table at offset ''index''
|-
|wide
|data-sort-value=196|c4
|c4
|1100 0100
|3/5: opcode, indexbyte1, indexbyte2<br />or<br /> iinc, indexbyte1, indexbyte2, countbyte1, countbyte2
Line 1,448 ⟶ 1,451:
|-
|''(no name)''
|data-sort-value=203|cb-fd
|
|
Line 1,455 ⟶ 1,458:
|-
|}
{{Refbegin}}
{{note label|Deprecated|†||Deprecated in Java 7 (major class version 51).<ref>{{cite web|url=https://docs.oracle.com/javase/specs/jvms/se24/html/jvms-4.html#jvms-4.9.1 |title=Chapter 4. The class File Format 4.9.1. Static Constraints |access-date=July 26, 2025}}</ref> They will not appear in class files generated from a compiler newer than that.}}
{{Refend}}
 
== See also ==
*[[Jazelle]] DBX (Direct Bytecode eXecution), a feature that executes some Java bytecodes in hardware, on some ARM9 CPUs
*[[Common Intermediate Language]] (CIL), a similar bytecode specification that runs on the CLR of the .NET Framework
 
== References ==
* [[Java bytecode]], a general description of Java bytecode within the context of the [[JVM]]
{{reflist}}
* [[Jazelle]] DBX (Direct Bytecode eXecution), a feature that executes some Java bytecodes in hardware, on some [[ARM9]] CPUs
* [[Common Intermediate Language]] (CIL), a similar bytecode specification that runs on the [[Common Language Runtime|CLR]] of the [[.NET Framework]].
* [[C to Java Virtual Machine compilers]]
 
== External links ==
* [httphttps://docs.oracle.com/javase/specs/jvms/se7se24/html/indexjvms-6.html Oracle'sThe Java Virtual Machine SpecificationInstruction Set]
* [http://homepages.inf.ed.ac.uk/kwxm/JVM/codeByFn.html List of Opcodes grouped by Function]
 
{{Java (Sun)}}
 
[[Category:Instruction set listings]]
{{Uncategorized|date=February 2015}}
[[Category:Java platform]]