Java Macro Instruction Index
The following are index of Java Macro Instruction Index, copied from The Java Virtual Machine Specification.
Name : nop
Opcode : 0(0x0)
Operation :
Do nothing
Format :
nop
Operand Stack :
No change
Description :
Do nothing.
Name : aconst_null
Opcode : 1(0x1)
Operation :
Push null
Format :
aconst_null
Operand Stack :
... ..., null
Description :
Push the null object reference onto the operand stack.
Notes :
The Java virtual machine does not mandate a concrete value for null.
Name : iconst_m1
Opcode : 2(0x2)
Operation :
Push int constant -1
Format :
iconst_0
Operand Stack :
... ..., -1
Description :
Push the int constant -1 onto the operand stack.
Notes :
This instructions is equivalent to bipush -1 , except that the operand -1 is implicit.
Name : iconst_0
Opcode : 3(0x3)
Operation :
Push int constant 0
Format :
iconst_0
Operand Stack :
... ..., 0
Description :
Push the int constant 0 onto the operand stack.
Notes :
This instructions is equivalent to bipush 0 , except that the operand 0 is implicit.
Name : iconst_1
Opcode : 4(0x4)
Operation :
Push int constant 1
Format :
iconst_1
Operand Stack :
... ..., 1
Description :
Push the int constant 1 onto the operand stack.
Notes :
This instructions is equivalent to bipush 1 , except that the operand 1 is implicit.
Name : iconst_2
Opcode : 5(0x5)
Operation :
Push int constant 2
Format :
iconst_2
Operand Stack :
... ..., 2
Description :
Push the int constant 2 onto the operand stack.
Notes :
This instructions is equivalent to bipush 2 , except that the operand 2 is implicit.
Name : iconst_3
Opcode : 6(0x6)
Operation :
Push int constant 3
Format :
iconst_3
Operand Stack :
... ..., 3
Description :
Push the int constant 3 onto the operand stack.
Notes :
This instructions is equivalent to bipush 3 , except that the operand 3 is implicit.
Name : iconst_4
Opcode : 7(0x7)
Operation :
Push int constant 4
Format :
iconst_4
Operand Stack :
... ..., 4
Description :
Push the int constant 4 onto the operand stack.
Notes :
This instructions is equivalent to bipush 4 , except that the operand 4 is implicit.
Name : iconst_5
Opcode : 8(0x8)
Operation :
Push int constant 5
Format :
iconst_5
Operand Stack :
... ..., 5
Description :
Push the int constant 5 onto the operand stack.
Notes :
This instructions is equivalent to bipush 5 , except that the operand 5 is implicit.
Name : lconst_0
Opcode : 9(0x9)
Operation :
Push long constant
Format :
lconst_0
Operand Stack :
... ..., 0
Description :
Push the long constant0 onto the operand stack.
Name : lconst_1
Opcode : 10(0xa)
Operation :
Push long constant
Format :
lconst_1
Operand Stack :
... ..., 1
Description :
Push the long constant 1 onto the operand stack.
Name : fconst_0
Opcode : 11(0xb)
Operation :
Push float
Format :
fconst_0
Operand Stack :
... ..., 0
Description :
Push the float constant 0.0 onto the operand stack.
Name : fconst_1
Opcode : 12(0xc)
Operation :
Push float
Format :
fconst_1
Operand Stack :
... ..., 1
Description :
Push the float constant 1.0 onto the operand stack.
Name : fconst_2
Opcode : 13(0xd)
Operation :
Push float
Format :
fconst_2
Operand Stack :
... ..., 2
Description :
Push the float constant 2.0 onto the operand stack.
Name : dconst_0
Opcode : 14(0xe)
Operation :
Push double
Format :
dconst_0
Operand Stack :
... ..., 0
Description :
Push the double constant 0.0 onto the operand stack.
Name : dconst_1
Opcode : 15(0xf)
Operation :
Push double
Format :
dconst_1
Operand Stack :
... ..., 1
Description :
Push the double constant 1.0 onto the operand stack.
Name : bipush
Opcode : 16(0x10)
Operation :
Push byte
Format :
bipush
Operand Stack :
... ..., value
Description :
The immediate byte is sign-extended to an int value. That value is pushed onto the operand stack.
Name : sipush
Opcode : 17(0x11)
Operation :
Push short
Format :
sipush
Operand Stack :
... ..., value
Description :
The immediate unsigned byte1 and byte2 values are assembled into an intermediate short where the value of the short is (byte1 << 8) | byte2. The intermediate value is then sign-extended to an int value. That value is pushed onto the operand stack.
Name : ldc
Opcode : 18(0x12)
Operation :
Push item from runtime constant pool
Format :
ldc
Operand Stack :
... ..., value
Description :
The index is an unsigned byte that must be a valid index into the runtime constant pool of the current class. The runtime constant pool entry at index either must be a runtime constant of type int or float, or must be a symbolic reference to a string literal.
If the runtime constant pool entry is a runtime constant of type int or float, the numeric value of that runtime constant is pushed onto the operand stack as an int or float, respectively.
Otherwise, the runtime constant pool entry must be a reference to an instance of class String representing a string literal. A reference to that instance, value, is pushed onto the operand stack.
Notes :
The ldc instruction can only be used to push a value of type float taken from the float value set because a constant of type float in the constant pool must be taken from the float value set.
Name : ldc_w
Opcode : 19(0x13)
Operation :
Push item from runtime constant pool (wide index)
Format :
ldc_w
Operand Stack :
... ..., value
Description :
The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index into the runtime constant pool of the current class, where the value of the index is calculated as (indexbyte1 << 8) | indexbyte2. The index must be a valid index into the runtime constant pool of the current class. The runtime constant pool entry at the index either must be a runtime constant of type int or float, or must be a symbolic reference to a string literal.
If the runtime constant pool entry is a runtime constant of type int or float, the numeric value of that runtime constant is pushed onto the operand stack as an int or float, respectively.
Otherwise, the runtime constant pool entry must be a reference to an instance of class String representing a string literal. A reference to that instance, value, is pushed onto the operand stack.
Notes :
The ldc_w instruction is identical to the ldc instruction except for its wider runtime constant pool index.
The ldc_w instruction can only be used to push a value of type float taken from the float value set because a constant of type float in the constant pool must be taken from the float value set.
Name : ldc2_w
Opcode : 20(0x14)
Operation :
Push long or double from runtime constant pool (wide index)
Format :
ldc2_w
Operand Stack :
... ..., value
Description :
The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index into the runtime constant pool of the current class, where the value of the index is calculated as (indexbyte1 << 8) | indexbyte2. The index must be a valid index into the runtime constant pool of the current class. The runtime constant pool entry at the index must be a runtime constant of type long or double. The numeric value of that runtime constant is pushed onto the operand stack as a long or double, respectively.
Notes :
Only a wide-index version of the ldc2_w instruction exists; there is no ldc2 instruction that pushes a long or double with a single-byte index.
The ldc2_w instruction can only be used to push a value of type double taken from the double value set because a constant of type double in the constant pool must be taken from the double value set.
Name : iload
Opcode : 21(0x15)
Operation :
Load int from local variable
Format :
iload
Operand Stack :
... ..., value
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The local variable at index must contain an int. The value of the local variable at index is pushed onto the operand stack.
Notes :
The iload opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : lload
Opcode : 22(0x16)
Operation :
Load long from local variable
Format :
lload
Operand Stack :
... ..., value
Description :
The index is an unsigned byte. Both index and index + 1 must be indices into the local variable array of the current frame. The local variable at index must contain a long. The value of the local variable at index is pushed onto the operand stack.
Notes :
The lload opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : fload
Opcode : 23(0x17)
Operation :
Load float from local variable
Format :
fload
Operand Stack :
... ..., value
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The local variable at index must contain a float. The value of the local variable at index is pushed onto the operand stack.
Notes :
The fload opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : dload
Opcode : 24(0x18)
Operation :
Load double from local variable
Format :
dload
Operand Stack :
... ..., value
Description :
The index is an unsigned byte. Both index and index + 1 must be indices into the local variable array of the current frame. The local variable at index must contain a double. The value of the local variable at index is pushed onto the operand stack.
Notes :
The dload opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : aload
Opcode : 25(0x19)
Operation :
Load reference from local variable
Format :
aload
Operand Stack :
... ..., objectref
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The local variable at index must contain a reference. The objectref in the local variable at index is pushed onto the operand stack.
Notes :
The aload instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the astore instruction is intentional.
The aload opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : iload_0
Opcode : 26(0x1a)
Operation :
Load int from local variable
Format :
iload_0
Operand Stack :
... ..., value
Description :
0 must be an index into the local variable array of the current frame. The local variable at index 0 must contain an int. The value of the local variable at 0 is pushed onto the operand stack.
Notes :
The iload_0 instructions is the same as iload with an index of 0, except that the operand 0 is implicit.
Name : iload_1
Opcode : 27(0x1b)
Operation :
Load int from local variable
Format :
iload_1
Operand Stack :
... ..., value
Description :
1 must be an index into the local variable array of the current frame. The local variable at index 1 must contain an int. The value of the local variable at 1 is pushed onto the operand stack.
Notes :
The iload_1 instructions is the same as iload with an index of 1, except that the operand 1 is implicit.
Name : iload_2
Opcode : 28(0x1c)
Operation :
Load int from local variable
Format :
iload_2
Operand Stack :
... ..., value
Description :
2 must be an index into the local variable array of the current frame. The local variable at index 2 must contain an int. The value of the local variable at 2 is pushed onto the operand stack.
Notes :
The iload_2 instructions is the same as iload with an index of 2, except that the operand 2 is implicit.
Name : iload_3
Opcode : 29(0x1d)
Operation :
Load int from local variable
Format :
iload_3
Operand Stack :
... ..., value
Description :
3 must be an index into the local variable array of the current frame. The local variable at index 3 must contain an int. The value of the local variable at 3 is pushed onto the operand stack.
Notes :
The iload_3 instructions is the same as iload with an index of 3, except that the operand 3 is implicit.
Name : lload_0
Opcode : 30(0x1e)
Operation :
Load long from local variable
Format :
lload_0
Operand Stack :
... ..., value
Description :
Both 0 and 1 must be indices into the local variable array of the current frame. The local variable at 0 must contain a long. The value of the local variable at 0 is pushed onto the operand stack.
Notes :
The lload_0 instructions is the same as lload with an index of 0, except that the operand 0 is implicit.
Name : lload_1
Opcode : 31(0x1f)
Operation :
Load long from local variable
Format :
lload_1
Operand Stack :
... ..., value
Description :
Both 1 and 2 must be indices into the local variable array of the current frame. The local variable at 1 must contain a long. The value of the local variable at 1 is pushed onto the operand stack.
Notes :
The lload_1 instructions is the same as lload with an index of 1, except that the operand 1 is implicit.
Name : lload_2
Opcode : 32(0x20)
Operation :
Load long from local variable
Format :
lload_2
Operand Stack :
... ..., value
Description :
Both 2 and 3 must be indices into the local variable array of the current frame. The local variable at 2 must contain a long. The value of the local variable at 2 is pushed onto the operand stack.
Notes :
The lload_2 instructions is the same as lload with an index of 2, except that the operand 2 is implicit.
Name : lload_3
Opcode : 33(0x21)
Operation :
Load long from local variable
Format :
lload_3
Operand Stack :
... ..., value
Description :
Both 3 and 4 must be indices into the local variable array of the current frame. The local variable at 3 must contain a long. The value of the local variable at 3 is pushed onto the operand stack.
Notes :
The lload_3 instructions is the same as lload with an index of 3, except that the operand 3 is implicit.
Name : fload_0
Opcode : 34(0x22)
Operation :
Load float from local variable
Format :
fload_0
Operand Stack :
... ..., value
Description :
0 must be an index into the local variable array of the current frame. The local variable at 0 must contain a float. The value of the local variable at 0 is pushed onto the operand stack.
Notes :
The fload_0 instructions is the same as fload with an index of 0, except that the operand 0 is implicit.
Name : fload_1
Opcode : 35(0x23)
Operation :
Load float from local variable
Format :
fload_1
Operand Stack :
... ..., value
Description :
1 must be an index into the local variable array of the current frame. The local variable at 1 must contain a float. The value of the local variable at 1 is pushed onto the operand stack.
Notes :
The fload_1 instructions is the same as fload with an index of 1, except that the operand 1 is implicit.
Name : fload_2
Opcode : 36(0x24)
Operation :
Load float from local variable
Format :
fload_2
Operand Stack :
... ..., value
Description :
2 must be an index into the local variable array of the current frame. The local variable at 2 must contain a float. The value of the local variable at 2 is pushed onto the operand stack.
Notes :
The fload_2 instructions is the same as fload with an index of 2, except that the operand 2 is implicit.
Name : fload_3
Opcode : 37(0x25)
Operation :
Load float from local variable
Format :
fload_3
Operand Stack :
... ..., value
Description :
3 must be an index into the local variable array of the current frame. The local variable at 3 must contain a float. The value of the local variable at 3 is pushed onto the operand stack.
Notes :
The fload_3 instructions is the same as fload with an index of 3, except that the operand 3 is implicit.
Name : dload_0
Opcode : 38(0x26)
Operation :
Load double from local variable
Format :
dload_0
Operand Stack :
... ..., value
Description :
Both 0 and 1 must be indices into the local variable array of the current frame. The local variable at 0 must contain a double. The value of the local variable at 0 is pushed onto the operand stack.
Notes :
The dload_0 instructions is the same as dload with an index of 0, except that the operand 0 is implicit.
Name : dload_1
Opcode : 39(0x27)
Operation :
Load double from local variable
Format :
dload_1
Operand Stack :
... ..., value
Description :
Both 1 and 2 must be indices into the local variable array of the current frame. The local variable at 1 must contain a double. The value of the local variable at 1 is pushed onto the operand stack.
Notes :
The dload_1 instructions is the same as dload with an index of 1, except that the operand 1 is implicit.
Name : dload_2
Opcode : 40(0x28)
Operation :
Load double from local variable
Format :
dload_2
Operand Stack :
... ..., value
Description :
Both 2 and 3 must be indices into the local variable array of the current frame. The local variable at 2 must contain a double. The value of the local variable at 2 is pushed onto the operand stack.
Notes :
The dload_2 instructions is the same as dload with an index of 2, except that the operand 2 is implicit.
Name : dload_3
Opcode : 41(0x29)
Operation :
Load double from local variable
Format :
dload_3
Operand Stack :
... ..., value
Description :
Both 3 and 4 must be indices into the local variable array of the current frame. The local variable at 3 must contain a double. The value of the local variable at 3 is pushed onto the operand stack.
Notes :
The dload_3 instructions is the same as dload with an index of 3, except that the operand 3 is implicit.
Name : aload_0
Opcode : 42(0x2a)
Operation :
Load reference from local variable
Format :
aload_0
Operand Stack :
... ..., objectref
Description :
Load the item in the local variable array of the current frame with index 0. The local variable at that index must contain a reference. The objectref in the local variable at that index is pushed onto the operand stack.
Notes :
An aload_0 instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_0 instruction is intentional. The aload_0 instructions is the same as aload with an index of 0, except that the operand 0 is implicit.
Name : aload_1
Opcode : 43(0x2b)
Operation :
Load reference from local variable
Format :
aload_1
Operand Stack :
... ..., objectref
Description :
Load the item in the local variable array of the current frame with index 1. The local variable at that index must contain a reference. The objectref in the local variable at that index is pushed onto the operand stack.
Notes :
An aload_1 instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_1 instruction is intentional. The aload_1 instructions is the same as aload with an index of 1, except that the operand 1 is implicit.
Name : aload_2
Opcode : 44(0x2c)
Operation :
Load reference from local variable
Format :
aload_2
Operand Stack :
... ..., objectref
Description :
Load the item in the local variable array of the current frame with index 2. The local variable at that index must contain a reference. The objectref in the local variable at that index is pushed onto the operand stack.
Notes :
An aload_2 instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_2 instruction is intentional. The aload_2 instructions is the same as aload with an index of 2, except that the operand 2 is implicit.
Name : aload_3
Opcode : 45(0x2d)
Operation :
Load reference from local variable
Format :
aload_3
Operand Stack :
... ..., objectref
Description :
Load the item in the local variable array of the current frame with index 3. The local variable at that index must contain a reference. The objectref in the local variable at that index is pushed onto the operand stack.
Notes :
An aload_3 instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_3 instruction is intentional. The aload_3 instructions is the same as aload with an index of 3, except that the operand 3 is implicit.
Name : iaload
Opcode : 46(0x2e)
Operation :
Load int from array
Format :
iaload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type int. The index must be of type int. Both arrayref and index are popped from the operand stack. The int value in the component of the array at index is retrieved and pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, iaload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the iaload instruction throws an ArrayIndexOutOfBoundsException.
Name : laload
Opcode : 47(0x2f)
Operation :
Load long from array
Format :
laload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type long. The index must be of type int. Both arrayref and index are popped from the operand stack. The long value in the component of the array at index is retrieved and pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, laload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the laload instruction throws an ArrayIndexOutOfBoundsException.
Name : faload
Opcode : 48(0x30)
Operation :
Load float from array
Format :
faload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type float. The index must be of type int. Both arrayref and index are popped from the operand stack. The float value in the component of the array at index is retrieved and pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, faload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the faload instruction throws an ArrayIndexOutOfBoundsException.
Name : daload
Opcode : 49(0x31)
Operation :
Load double from array
Format :
daload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type double. The index must be of type int. Both arrayref and index are popped from the operand stack. The double value in the component of the array at index is retrieved and pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, daload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the daload instruction throws an ArrayIndexOutOfBoundsException.
Name : aaload
Opcode : 50(0x32)
Operation :
Load reference from array
Format :
aaload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be
of type reference and must refer to an array whose components are of type reference. The index must be of type int. Both arrayref and index are popped from the operand stack. The reference value in the component of the array at index is retrieved and pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, aaload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the aaload instruction throws an ArrayIndexOutOfBoundsException.
Name : baload
Opcode : 51(0x33)
Operation :
Load byte or boolean from array
Format :
baload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type byte or of type boolean. The index must be of type int. Both arrayref and index are popped from the operand stack. If the components of the array are of type byte, the component of the array at index is retrieved and sign-extended to an int value. If the components of the array are of type boolean, the component of the array at index is retrieved and zero-extended to an int value. In either case the resulting value is pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, baload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the baload instruction throws an ArrayIndexOutOfBoundsException.
Name : caload
Opcode : 52(0x34)
Operation :
Load char from array
Format :
caload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type char. The index must be of type int. Both arrayref and index are popped from the operand stack. The component of the array at index is retrieved and zero-extended to an int value. That value is pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, caload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the caload instruction throws an ArrayIndexOutOfBoundsException.
Name : saload
Opcode : 53(0x35)
Operation :
Load short from array
Format :
saload
Operand Stack :
..., arrayref, index ..., value
Description :
The arrayref must be of type reference and must refer to an array whose components are of type short. The index must be of type int. Both arrayref and index are popped from the operand stack. The component of the array at index is retrieved and sign-extended to an int value. That value is pushed onto the operand stack.
Runtime Exceptions :
If arrayref is null, saload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the saload instruction throws an ArrayIndexOutOfBoundsException.
Name : istore
Opcode : 54(0x36)
Operation :
Store int into local variable
Format :
istore
Operand Stack :
..., value ...
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type int. It is popped from the operand stack, and the value of the local variable at index is set to value.
Notes :
The istore opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : lstore
Opcode : 55(0x37)
Operation :
Store long into local variable
Format :
lstore
Operand Stack :
..., value ...
Description :
The index is an unsigned byte. Both index and index + 1 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type long. It is popped from the operand stack, and the local variables at index and index + 1 are set to value.
Notes :
The lstore opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : fstore
Opcode : 56(0x38)
Operation :
Store float into local variable
Format :
fstore
Operand Stack :
..., value ...
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting in value. The value of the local variable at index is set to value.
Notes :
The fstore opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : dstore
Opcode : 57(0x39)
Operation :
Store double into local variable
Format :
dstore
Operand Stack :
..., value ...
Description :
The index is an unsigned byte. Both index and index + 1 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion, resulting in value. The local variables at index and index + 1 are set to value.
Notes :
The dstore opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : astore
Opcode : 58(0x3a)
Operation :
Store reference into local variable
Format :
astore
Operand Stack :
..., objectref ...
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at index is set to objectref.
Notes :
The astore instruction is used with an objectref of type returnAddress when implementing the finally clauses of the Java programming language. The aload instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the astore instruction is intentional.
The astore opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : istore_0
Opcode : 59(0x3b)
Operation :
Store int into local variable
Format :
istore_0
Operand Stack :
..., value ...
Description :
0 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type int. It is popped from the operand stack, and the value of the local variable at 0 is set to value.
Notes :
The istore_0 instructions is the same as istore with an index of 0, except that the operand 0 is implicit.
Name : istore_1
Opcode : 60(0x3c)
Operation :
Store int into local variable
Format :
istore_1
Operand Stack :
..., value ...
Description :
1 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type int. It is popped from the operand stack, and the value of the local variable at 1 is set to value.
Notes :
The istore_1 instructions is the same as istore with an index of 1, except that the operand 1 is implicit.
Name : istore_2
Opcode : 61(0x3d)
Operation :
Store int into local variable
Format :
istore_2
Operand Stack :
..., value ...
Description :
2 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type int. It is popped from the operand stack, and the value of the local variable at 2 is set to value.
Notes :
The istore_2 instructions is the same as istore with an index of 2, except that the operand 2 is implicit.
Name : istore_3
Opcode : 62(0x3e)
Operation :
Store int into local variable
Format :
istore_3
Operand Stack :
..., value ...
Description :
3 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type int. It is popped from the operand stack, and the value of the local variable at 3 is set to value.
Notes :
The istore_3 instructions is the same as istore with an index of 3, except that the operand 3 is implicit.
Name : lstore_0
Opcode : 63(0x3f)
Operation :
Store long into local variable
Format :
lstore_0
Operand Stack :
..., value ...
Description :
Both 0 and 1 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type long. It is popped from the operand stack, and the local variables at 0 and 1 are set to value.
Notes :
The lstore_0 instructions is the same as lstore with an index of 0, except that the operand 0 is implicit.
Name : lstore_1
Opcode : 64(0x40)
Operation :
Store long into local variable
Format :
lstore_1
Operand Stack :
..., value ...
Description :
Both 1 and 2 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type long. It is popped from the operand stack, and the local variables at 1 and 2 are set to value.
Notes :
The lstore_1 instructions is the same as lstore with an index of 1, except that the operand 1 is implicit.
Name : lstore_2
Opcode : 65(0x41)
Operation :
Store long into local variable
Format :
lstore_2
Operand Stack :
..., value ...
Description :
Both 2 and 3 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type long. It is popped from the operand stack, and the local variables at 2 and 3 are set to value.
Notes :
The lstore_2 instructions is the same as lstore with an index of 2, except that the operand 2 is implicit.
Name : lstore_3
Opcode : 66(0x42)
Operation :
Store long into local variable
Format :
lstore_3
Operand Stack :
..., value ...
Description :
Both 3 and 4 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type long. It is popped from the operand stack, and the local variables at 3 and 4 are set to value.
Notes :
The lstore_3 instructions is the same as lstore with an index of 3, except that the operand 3 is implicit.
Name : fstore_0
Opcode : 67(0x43)
Operation :
Store float into local variable
Format :
fstore_0
Operand Stack :
..., value ...
Description :
0 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting value1. The value of the local variable at 0 is set to value1.
Notes :
The fstore_0 is the same as fstore with an index of 0, except that the operand 0 is implicit.
Name : fstore_1
Opcode : 68(0x44)
Operation :
Store float into local variable
Format :
fstore_1
Operand Stack :
..., value ...
Description :
1 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting value1. The value of the local variable at 1 is set to value1.
Notes :
The fstore_1 is the same as fstore with an index of 1, except that the operand 1 is implicit.
Name : fstore_2
Opcode : 69(0x45)
Operation :
Store float into local variable
Format :
fstore_2
Operand Stack :
..., value ...
Description :
2 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting value1. The value of the local variable at 2 is set to value1.
Notes :
The fstore_2 is the same as fstore with an index of 2, except that the operand 2 is implicit.
Name : fstore_3
Opcode : 70(0x46)
Operation :
Store float into local variable
Format :
fstore_3
Operand Stack :
..., value ...
Description :
3 must be an index into the local variable array of the current frame. The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting value1. The value of the local variable at 3 is set to value1.
Notes :
The fstore_3 is the same as fstore with an index of 3, except that the operand 3 is implicit.
Name : dstore_0
Opcode : 71(0x47)
Operation :
Store double into local variable
Format :
dstore_0
Operand Stack :
..., value ...
Description :
Both 0 and 1 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion, resulting in value1. The local variables at 0 and 1 are set to value1.
Notes :
The dstore_0 instructions is the same as dstore with an index of 0, except that the operand 0 is implicit.
Name : dstore_1
Opcode : 72(0x48)
Operation :
Store double into local variable
Format :
dstore_1
Operand Stack :
..., value ...
Description :
Both 1 and 2 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion, resulting in new value. The local variables at 1 and 2 are set to new value.
Notes :
The dstore_1 instructions is the same as dstore with an index of 1, except that the operand 1 is implicit.
Name : dstore_2
Opcode : 73(0x49)
Operation :
Store double into local variable
Format :
dstore_2
Operand Stack :
..., value ...
Description :
Both 2 and 3 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion, resulting in new value. The local variables at 2 and 3 are set to new value.
Notes :
The dstore_2 instructions is the same as dstore with an index of 2, except that the operand 2 is implicit.
Name : dstore_3
Opcode : 74(0x4a)
Operation :
Store double into local variable
Format :
dstore_3
Operand Stack :
..., value ...
Description :
Both 3 and 4 must be indices into the local variable array of the current frame. The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion, resulting in new value. The local variables at 3 and 4 are set to new value.
Notes :
The dstore_3 instructions is the same as dstore with an index of 3, except that the operand 3 is implicit.
Name : astore_0
Opcode : 75(0x4b)
Operation :
Store reference into local variable
Format :
astore_0
Operand Stack :
..., objectref ...
Description :
0 is the index into the local variable array of the current frame. The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at index 0 is set to objectref.
Notes :
The astore_ instruction is used with an objectref of type returnAddress when implementing the finally clauses of the Java programming language. An aload_ instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_ instruction is intentional.
The astore_0 instructions is the same as astore with an index of 0, except that the operand 0 is implicit.
Name : astore_1
Opcode : 76(0x4c)
Operation :
Store reference into local variable
Format :
astore_1
Operand Stack :
..., objectref ...
Description :
1 is the index into the local variable array of the current frame. The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at index 1 is set to objectref.
Notes :
The astore_ instruction is used with an objectref of type returnAddress when implementing the finally clauses of the Java programming language. An aload_ instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_ instruction is intentional.
The astore_1 instructions is the same as astore with an index of 1, except that the operand 1 is implicit.
Name : astore_2
Opcode : 77(0x4d)
Operation :
Store reference into local variable
Format :
astore_2
Operand Stack :
..., objectref ...
Description :
2 is the index into the local variable array of the current frame. The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at index 2 is set to objectref.
Notes :
The astore_ instruction is used with an objectref of type returnAddress when implementing the finally clauses of the Java programming language. An aload_ instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_ instruction is intentional.
The astore_2 instructions is the same as astore with an index of 2, except that the operand 2 is implicit.
Name : astore_3
Opcode : 78(0x4e)
Operation :
Store reference into local variable
Format :
astore_3
Operand Stack :
..., objectref ...
Description :
3 is the index into the local variable array of the current frame. The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at index 3 is set to objectref.
Notes :
The astore_ instruction is used with an objectref of type returnAddress when implementing the finally clauses of the Java programming language. An aload_ instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_ instruction is intentional.
The astore_3 instructions is the same as astore with an index of 3, except that the operand 3 is implicit.
Name : iastore
Opcode : 79(0x4f)
Operation :
Store into int array
Format :
iastore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type int. Both index and value must be of type int. The arrayref, index, and value are popped from the operand stack. The int value is stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, iastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the iastore instruction throws an ArrayIndexOutOfBoundsException.
Name : lastore
Opcode : 80(0x50)
Operation :
Store into long array
Format :
lastore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type long. The index must be of type int, and value must be of type long. The arrayref, index, and value are popped from the operand stack. The long value is stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, lastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the lastore instruction throws an ArrayIndexOutOfBoundsException.
Name : fastore
Opcode : 81(0x51)
Operation :
Store into float array
Format :
fastore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type float. The index must be of type int, and the value must be of type float. The arrayref, index, and value are popped from the operand stack. The float value undergoes value set conversion, resulting in value, and value is stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, fastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the fastore instruction throws an ArrayIndexOutOfBoundsException.
Name : dastore
Opcode : 82(0x52)
Operation :
Store into double array
Format :
dastore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type double. The index must be of type int, and value must be of type double. The arrayref, index, and value are popped from the operand stack. The double value undergoes value set conversion, resulting in value, which is stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, dastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the dastore instruction throws an ArrayIndexOutOfBoundsException.
Name : aastore
Opcode : 83(0x53)
Operation :
Store into reference array
Format :
aastore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type reference. The index must be of type int and value must be of type reference. The arrayref, index, and value are popped from the operand stack. The reference value is stored as the component of the array at index.
The type of value must be assignment compatible with the type of the components of the array referenced by arrayref. Assignment of a value of reference type S (source) to a variable of reference type T (target) is allowed only when the type S supports all the operations defined on type T. The detailed rules follow:
If S is a class type, then:
If T is a class type, then S must be the same class as T, or S must be a subclass of T;
If T is an interface type, S must implement interface T.
If S is an interface type, then:
If T is a class type, then T must be Object.
If T is an interface type, then T must be the same interface as S or a superinterface of S.
If S is an array type, namely, the type SC[], that is, an array of components of type SC, then:
If T is a class type, then T must be Object.
If T is an array type TC[], that is, an array of components of type TC, then one of the following must be true:
TC and SC are the same primitive type.
TC and SC are reference types, and type SC is assignable to TC by these runtime rules.
If T is an interface type, T must be one of the interfaces implemented by arrays.
Runtime Exceptions :
If arrayref is null, aastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the aastore instruction throws an ArrayIndexOutOfBoundsException.
Otherwise, if arrayref is not null and the actual type of value is not assignment compatible with the actual type of the components of the array, aastore throws an ArrayStoreException.
Name : bastore
Opcode : 84(0x54)
Operation :
Store into byte or boolean array
Format :
bastore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type byte or of type boolean. The index and the value must both be of type int. The arrayref, index, and value are popped from the operand stack. If the components of the array are of type byte, the int value is truncated to a byte and stored as the component of the array indexed by index. If the components of the array are of type boolean, the int value is truncated to its low order bit then zero-extended to the storage size for components of boolean arrays used by the implementation. The result is stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, bastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the bastore instruction throws an ArrayIndexOutOfBoundsException.
Name : castore
Opcode : 85(0x55)
Operation :
Store into char array
Format :
castore
Operand Stack :
..., arrayref, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type char. The index and the value must both be of type int. The arrayref, index, and value are popped from the operand stack. The int value is truncated to a char and stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, castore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the castore instruction throws an ArrayIndexOutOfBoundsException.
Name : sastore
Opcode : 86(0x56)
Operation :
Store into short array
Format :
sastore
Operand Stack :
..., array, index, value ...
Description :
The arrayref must be of type reference and must refer to an array whose components are of type short. Both index and value must be of type int. The arrayref, index, and value are popped from the operand stack. The int value is truncated to a short and stored as the component of the array indexed by index.
Runtime Exceptions :
If arrayref is null, sastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the sastore instruction throws an ArrayIndexOutOfBoundsException.
Name : pop
Opcode : 87(0x57)
Operation :
Pop the top operand stack value
Format :
pop
Operand Stack :
..., value ...
Description :
Pop the top value from the operand stack.
The pop instruction must not be used unless value is a value of a category 1 computational type.
Name : pop2
Opcode : 88(0x58)
Operation :
Pop the top one or two operand stack values
Format :
pop2
Operand Stack :
Form 1: ..., value2, value1 ... where each of value1 and value2 is a value of a category 1 computational type. Form 2: ..., value ... where value is a value of a category 2 computational type.
Description :
Pop the top one or two values from the operand stack.
Name : dup
Opcode : 89(0x59)
Operation :
Duplicate the top operand stack value
Format :
dup
Operand Stack :
..., value ..., value, value
Description :
Duplicate the top value on the operand stack and push the duplicated value onto the operand stack.
The dup instruction must not be used unless value is a value of a category 1 computational type.
Name : dup_x1
Opcode : 90(0x5a)
Operation :
Duplicate the top operand stack value and insert two values down
Format :
dup_x1
Operand Stack :
..., value2, value1 ..., value1, value2, value1
Description :
Duplicate the top value on the operand stack and insert the duplicated value two values down in the operand stack.
The dup_x1 instruction must not be used unless both value1 and value2 are values of a category 1 computational type.
Name : dup_x2
Opcode : 91(0x5b)
Operation :
Duplicate the top operand stack value and insert two or three values down
Format :
dup_x2
Operand Stack :
Form 1: ..., value3, value2, value1 ..., value1, value3, value2, value1 where value1, value2, and value3 are all values of a category 1 computational type. Form 2: ..., value2, value1 ..., value1, value2, value1 where value1 is a value of a category 1 computational type and value2 is a value of a category 2 computational type.
Description :
Duplicate the top value on the operand stack and insert the duplicated value two or three values down in the operand stack.
Name : dup2
Opcode : 92(0x5c)
Operation :
Duplicate the top one or two operand stack values
Format :
dup2
Operand Stack :
Form 1: ..., value2, value1 ..., value2, value1, value2, value1 where both value1 and value2 are values of a category 1 computational type. Form 2: ..., value ..., value, value where value is a value of a category 2 computational type.
Description :
Duplicate the top one or two values on the operand stack and push the duplicated value or values back onto the operand stack in the original order.
Name : dup2_x1
Opcode : 93(0x5d)
Operation :
Duplicate the top one or two operand stack values and insert two or three values down
Format :
dup2_x1
Operand Stack :
Form 1: ..., value3, value2, value1 ..., value2, value1, value3, value2, value1 where value1, value2, and value3 are all values of a category 1 computational type. Form 2: ..., value2, value1 ..., value1, value2, value1 where value1 is a value of a category 2 computational type and value2 is a value of a category 1 computational type.
Description :
Duplicate the top one or two values on the operand stack and insert the duplicated values, in the original order, one value beneath the original value or values in the operand stack.
Name : dup2_x2
Opcode : 94(0x5e)
Operation :
Duplicate the top one or two operand stack values and insert two, three, or four values down
Format :
dup2_x2
Operand Stack :
Form 1: ..., value4, value3, value2, value1 ..., value2, value1, value4, value3, value2, value1 where value1, value2, value3, and value4 are all values of a category 1 computational type. Form 2: ..., value3, value2, value1 ..., value1, value3, value2, value1 where value1 is a value of a category 2 computational type and value2 and value3 are both values of a category 1 computational type. Form 3: ..., value3, value2, value1 ..., value2, value1, value3, value2, value1 where value1 and value2 are both values of a category 1 computational type and value3 is a value of a category 2 computational type. Form 4: ..., value2, value1 ..., value1, value2, value1 where value1 and value2 are both values of a category 2 computational type.
Description :
Duplicate the top one or two values on the operand stack and insert the duplicated values, in the original order, into the operand stack.
Name : swap
Opcode : 95(0x5f)
Operation :
Swap the top two operand stack values
Format :
swap
Operand Stack :
..., value2, value1 ..., value1, value2
Description :
Swap the top two values on the operand stack.
The swap instruction must not be used unless value1 and value2 are both values of a category 1 computational type.
Notes :
The Java virtual machine does not provide an instruction implementing a swap on operands of category 2 computational types.
Name : iadd
Opcode : 96(0x60)
Operation :
Add int
Format :
iadd
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. The int result is value1 + value2. The result is pushed onto the operand stack.
The result is the 32 low-order bits of the true mathematical result in a sufficiently wide twos-complement format, represented as a value of type int. If overflow occurs, then the sign of the result may not be the same as the sign of the mathematical sum of the two values.
Despite the fact that overflow may occur, execution of an iadd instruction never throws a runtime exception.
Name : ladd
Opcode : 97(0x61)
Operation :
Add long
Format :
ladd
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. The values are popped from the operand stack. The long result is value1 + value2. The result is pushed onto the operand stack.
The result is the 64 low-order bits of the true mathematical result in a sufficiently wide twos-complement format, represented as a value of type long. If overflow occurs, the sign of the result may not be the same as the sign of the mathematical sum of the two values.
Despite the fact that overflow may occur, execution of an ladd instruction never throws a runtime exception.
Name : fadd
Opcode : 98(0x62)
Operation :
Add float
Format :
fadd
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The float result is value1 + value2. The result is pushed onto the operand stack.
The result of an fadd instruction is governed by the rules of IEEE arithmetic:
If either value1 or value2 is NaN, the result is NaN.
The sum of two infinities of opposite sign is NaN.
The sum of two infinities of the same sign is the infinity of that sign.
The sum of an infinity and any finite value is equal to the infinity.
The sum of two zeroes of opposite sign is positive zero.
The sum of two zeroes of the same sign is the zero of that sign.
The sum of a zero and a nonzero finite value is equal to the nonzero value.
The sum of two nonzero finite values of the same magnitude and opposite sign is positive zero.
In the remaining cases, where neither operand is an infinity, a zero, or NaN and the values have the same sign or have different magnitudes, the sum is computed and rounded to the nearest representable value using IEEE 754 round to nearest mode. If the magnitude is too large to represent as a float, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a float, we say the operation underflows; the result is then a zero of appropriate sign.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of an fadd instruction never throws a runtime exception.
Name : dadd
Opcode : 99(0x63)
Operation :
Add double
Format :
dadd
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The double result is value1 + value2. The result is pushed onto the operand stack.
The result of a dadd instruction is governed by the rules of IEEE arithmetic:
If either value1 or value2 is NaN, the result is NaN.
The sum of two infinities of opposite sign is NaN.
The sum of two infinities of the same sign is the infinity of that sign.
The sum of an infinity and any finite value is equal to the infinity.
The sum of two zeroes of opposite sign is positive zero.
The sum of two zeroes of the same sign is the zero of that sign.
The sum of a zero and a nonzero finite value is equal to the nonzero value.
The sum of two nonzero finite values of the same magnitude and opposite sign is positive zero.
In the remaining cases, where neither operand is an infinity, a zero, or NaN and the values have the same sign or have different magnitudes, the sum is computed and rounded to the nearest representable value using IEEE 754 round to nearest mode. If the magnitude is too large to represent as a double, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a double, we say the operation underflows; the result is then a zero of appropriate sign.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of a dadd instruction never throws a runtime exception.
Name : isub
Opcode : 100(0x64)
Operation :
Subtract int
Format :
isub
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. The int result is value1 - value2. The result is pushed onto the operand stack.
For int subtraction, a - b produces the same result as a + (-b). For int values, subtraction from zero is the same as negation.
The result is the 32 low-order bits of the true mathematical result in a sufficiently wide twos-complement format, represented as a value of type int. If overflow occurs, then the sign of the result may not be the same as the sign of the mathematical sum of the two values.
Despite the fact that overflow may occur, execution of an isub instruction never throws a runtime exception.
Name : lsub
Opcode : 101(0x65)
Operation :
Subtract long
Format :
lsub
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. The values are popped from the operand stack. The long result is value1 - value2. The result is pushed onto the operand stack.
For long subtraction, a-b produces the same result as a+(-b). For long values, subtraction from zero is the same as negation.
The result is the 64 low-order bits of the true mathematical result in a sufficiently wide twos-complement format, represented as a value of type long. If overflow occurs, then the sign of the result may not be the same as the sign of the mathematical sum of the two values.
Despite the fact that overflow may occur, execution of an lsub instruction never throws a runtime exception.
Name : fsub
Opcode : 102(0x66)
Operation :
Subtract float
Format :
fsub
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The float result is value1 - value2. The result is pushed onto the operand stack.
For float subtraction, it is always the case that a-b produces the same result as a+(-b). However, for the fsub instruction, subtraction from zero is not the same as negation, because if x is +0.0, then 0.0-x equals +0.0, but -x equals -0.0.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of an fsub instruction never throws a runtime exception.
Name : dsub
Opcode : 103(0x67)
Operation :
Subtract double
Format :
dsub
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The double result is value1 - value2. The result is pushed onto the operand stack.
For double subtraction, it is always the case that a-b produces the same result as a+(-b). However, for the dsub instruction, subtraction from zero is not the same as negation, because if x is +0.0, then 0.0-x equals +0.0, but -x equals -0.0.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of a dsub instruction never throws a runtime exception.
Name : imul
Opcode : 104(0x68)
Operation :
Multiply int
Format :
imul
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. The int result is value1 * value2. The result is pushed onto the operand stack.
The result is the 32 low-order bits of the true mathematical result in a sufficiently wide twos-complement format, represented as a value of type int. If overflow occurs, then the sign of the result may not be the same as the sign of the mathematical sum of the two values.
Despite the fact that overflow may occur, execution of an imul instruction never throws a runtime exception.
Name : lmul
Opcode : 105(0x69)
Operation :
Multiply long
Format :
lmul
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. The values are popped from the operand stack. The long result is value1 * value2. The result is pushed onto the operand stack.
The result is the 64 low-order bits of the true mathematical result in a sufficiently wide twos-complement format, represented as a value of type long. If overflow occurs, the sign of the result may not be the same as the sign of the mathematical sum of the two values.
Despite the fact that overflow may occur, execution of an lmul instruction never throws a runtime exception.
Name : fmul
Opcode : 106(0x6a)
Operation :
Multiply float
Format :
fmul
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The float result is value1 * value2. The result is pushed onto the operand stack.
The result of an fmul instruction is governed by the rules of IEEE arithmetic:
If either value1 or value2 is NaN, the result is NaN.
If neither value1 nor value2 is NaN, the sign of the result is positive if both values have the same sign, and negative if the values have different signs.
Multiplication of an infinity by a zero results in NaN.
Multiplication of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
In the remaining cases, where neither an infinity nor NaN is involved, the product is computed and rounded to the nearest representable value using IEEE 754 round to nearest mode. If the magnitude is too large to represent as a float, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a float, we say the operation underflows; the result is then a zero of appropriate sign.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of an fmul instruction never throws a runtime exception.
Name : dmul
Opcode : 107(0x6b)
Operation :
Multiply double
Format :
dmul
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The double result is value1 * value2. The result is pushed onto the operand stack.
The result of a dmul instruction is governed by the rules of IEEE arithmetic:
If either value1 or value2 is NaN, the result is NaN.
If neither value1 nor value2 is NaN, the sign of the result is positive if both values have the same sign and negative if the values have different signs.
Multiplication of an infinity by a zero results in NaN.
Multiplication of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
In the remaining cases, where neither an infinity nor NaN is involved, the product is computed and rounded to the nearest representable value using IEEE 754 round to nearest mode. If the magnitude is too large to represent as a double, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a double, we say the operation underflows; the result is then a zero of appropriate sign.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, or loss of precision may occur, execution of a dmul instruction never throws a runtime exception.
Name : idiv
Opcode : 108(0x6c)
Operation :
Divide int
Format :
idiv
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. The int result is the value of the Java programming language expression value1 / value2. The result is pushed onto the operand stack.
An int division rounds towards 0; that is, the quotient produced for int values in n/d is an int value q whose magnitude is as large as possible while satisfying . Moreover, q is positive when and n and d have the same sign, but q is negative when and n and d have opposite signs.
There is one special case that does not satisfy this rule: if the dividend is the negative integer of largest possible magnitude for the int type, and the divisor is -1, then overflow occurs, and the result is equal to the dividend. Despite the overflow, no exception is thrown in this case.
Runtime Exceptions :
If the value of the divisor in an int division is 0, idiv throws an ArithmeticException.
Name : ldiv
Opcode : 109(0x6d)
Operation :
Divide long
Format :
ldiv
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. The values are popped from the operand stack. The long result is the value of the Java programming language expression value1 / value2. The result is pushed onto the operand stack.
A long division rounds towards 0; that is, the quotient produced for long values in n / d is a long value q whose magnitude is as large as possible while satisfying . Moreover, q is positive when and n and d have the same sign, but q is negative when and n and d have opposite signs.
There is one special case that does not satisfy this rule: if the dividend is the negative integer of largest possible magnitude for the long type and the divisor is -1, then overflow occurs and the result is equal to the dividend; despite the overflow, no exception is thrown in this case.
Runtime Exceptions :
If the value of the divisor in a long division is 0, ldiv throws an ArithmeticException.
Name : fdiv
Opcode : 110(0x6e)
Operation :
Divide float
Format :
fdiv
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The float result is value1 / value2. The result is pushed onto the operand stack.
The result of an fdiv instruction is governed by the rules of IEEE arithmetic:
If either value1 or value2 is NaN, the result is NaN.
If neither value1 nor value2 is NaN, the sign of the result is positive if both values have the same sign, negative if the values have different signs.
Division of an infinity by an infinity results in NaN.
Division of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
Division of a finite value by an infinity results in a signed zero, with the sign-producing rule just given.
Division of a zero by a zero results in NaN; division of zero by any other finite value results in a signed zero, with the sign-producing rule just given.
Division of a nonzero finite value by a zero results in a signed infinity, with the sign-producing rule just given.
In the remaining cases, where neither operand is an infinity, a zero, or NaN, the quotient is computed and rounded to the nearest float using IEEE 754 round to nearest mode. If the magnitude is too large to represent as a float, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a float, we say the operation underflows; the result is then a zero of appropriate sign.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, division by zero, or loss of precision may occur, execution of an fdiv instruction never throws a runtime exception.
Name : ddiv
Opcode : 111(0x6f)
Operation :
Divide double
Format :
ddiv
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The double result is value1 / value2. The result is pushed onto the operand stack.
The result of a ddiv instruction is governed by the rules of IEEE arithmetic:
If either value1 or value2 is NaN, the result is NaN.
If neither value1 nor value2 is NaN, the sign of the result is positive if both values have the same sign, negative if the values have different signs.
Division of an infinity by an infinity results in NaN.
Division of an infinity by a finite value results in a signed infinity, with the sign-producing rule just given.
Division of a finite value by an infinity results in a signed zero, with the sign-producing rule just given.
Division of a zero by a zero results in NaN; division of zero by any other finite value results in a signed zero, with the sign-producing rule just given.
Division of a nonzero finite value by a zero results in a signed infinity, with the sign-producing rule just given.
In the remaining cases, where neither operand is an infinity, a zero, or NaN, the quotient is computed and rounded to the nearest double using IEEE 754 round to nearest mode. If the magnitude is too large to represent as a double, we say the operation overflows; the result is then an infinity of appropriate sign. If the magnitude is too small to represent as a double, we say the operation underflows; the result is then a zero of appropriate sign.
The Java virtual machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, division by zero, or loss of precision may occur, execution of a ddiv instruction never throws a runtime exception.
Name : irem
Opcode : 112(0x70)
Operation :
Remainder int
Format :
irem
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. The int result is value1 - (value1 / value2) * value2. The result is pushed onto the operand stack.
The result of the irem instruction is such that (a/b)*b + (a%b) is equal to a. This identity holds even in the special case in which the dividend is the negative int of largest possible magnitude for its type and the divisor is -1 (the remainder is 0). It follows from this rule that the result of the remainder operation can be negative only if the dividend is negative and can be positive only if the dividend is positive. Moreover, the magnitude of the result is always less than the magnitude of the divisor.
Runtime Exceptions :
If the value of the divisor for an int remainder operator is 0, irem throws an ArithmeticException.
Name : lrem
Opcode : 113(0x71)
Operation :
Remainder long
Format :
lrem
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. The values are popped from the operand stack. The long result is value1 - (value1 / value2) * value2. The result is pushed onto the operand stack.
The result of the lrem instruction is such that (a/b)*b + (a%b) is equal to a. This identity holds even in the special case in which the dividend is the negative long of largest possible magnitude for its type and the divisor is -1 (the remainder is 0). It follows from this rule that the result of the remainder operation can be negative only if the dividend is negative and can be positive only if the dividend is positive; moreover, the magnitude of the result is always less than the magnitude of the divisor.
Runtime Exceptions :
If the value of the divisor for a long remainder operator is 0, lrem throws an ArithmeticException.
Name : frem
Opcode : 114(0x72)
Operation :
Remainder float
Format :
frem
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The result is calculated and pushed onto the operand stack as a float.
The result of an frem instruction is not the same as that of the so-called remainder operation defined by IEEE 754. The IEEE 754 "remainder" operation computes the remainder from a rounding division, not a truncating division, and so its behavior is not analogous to that of the usual integer remainder operator. Instead, the Java virtual machine defines frem to behave in a manner analogous to that of the Java virtual machine integer remainder instructions (irem and lrem); this may be compared with the C library function fmod.
The result of an frem instruction is governed by these rules:
If either value1 or value2 is NaN, the result is NaN.
If neither value1 nor value2 is NaN, the sign of the result equals the sign of the dividend.
If the dividend is an infinity or the divisor is a zero or both, the result is NaN.
If the dividend is finite and the divisor is an infinity, the result equals the dividend.
If the dividend is a zero and the divisor is finite, the result equals the dividend.
In the remaining cases, where neither operand is an infinity, a zero, or NaN, the floating-point remainder result from a dividend value1 and a divisor value2 is defined by the mathematical relation result = value1 - (value2 * q), where q is an integer that is negative only if value1 / value2 is negative and positive only if value1 / value2 is positive, and whose magnitude is as large as possible without exceeding the magnitude of the true mathematical quotient of value1 and value2.
Despite the fact that division by zero may occur, evaluation of an frem instruction never throws a runtime exception. Overflow, underflow, or loss of precision cannot occur.
Notes :
The IEEE 754 remainder operation may be computed by the library routine Math.IEEEremainder.
Name : drem
Opcode : 115(0x73)
Operation :
Remainder double
Format :
drem
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. The result is calculated and pushed onto the operand stack as a double.
The result of a drem instruction is not the same as that of the so-called remainder operation defined by IEEE 754. The IEEE 754 "remainder" operation computes the remainder from a rounding division, not a truncating division, and so its behavior is not analogous to that of the usual integer remainder operator. Instead, the Java virtual machine defines drem to behave in a manner analogous to that of the Java virtual machine integer remainder instructions (irem and lrem); this may be compared with the C library function fmod.
The result of a drem instruction is governed by these rules:
If either value1 or value2 is NaN, the result is NaN.
If neither value1 nor value2 is NaN, the sign of the result equals the sign of the dividend.
If the dividend is an infinity or the divisor is a zero or both, the result is NaN.
If the dividend is finite and the divisor is an infinity, the result equals the dividend.
If the dividend is a zero and the divisor is finite, the result equals the dividend.
In the remaining cases, where neither operand is an infinity, a zero, or NaN, the floating-point remainder result from a dividend value1 and a divisor value2 is defined by the mathematical relation result = value1 - (value2 * q), where q is an integer that is negative only if value1 / value2 is negative, and positive only if value1 / value2 is positive, and whose magnitude is as large as possible without exceeding the magnitude of the true mathematical quotient of value1 and value2.
Despite the fact that division by zero may occur, evaluation of a drem instruction never throws a runtime exception. Overflow, underflow, or loss of precision cannot occur.
Notes :
The IEEE 754 remainder operation may be computed by the library routine Math.IEEEremainder.
Name : ineg
Opcode : 116(0x74)
Operation :
Negate int
Format :
ineg
Operand Stack :
..., value ..., result
Description :
The value must be of type int. It is popped from the operand stack. The int result is the arithmetic negation of value, -value. The result is pushed onto the operand stack.
For int values, negation is the same as subtraction from zero. Because the Java virtual machine uses twos-complement representation for integers and the range of twos-complement values is not symmetric, the negation of the maximum negative int results in that same maximum negative number. Despite the fact that overflow has occurred, no exception is thrown.
For all int values x, -x equals (~x) + 1.
Name : lneg
Opcode : 117(0x75)
Operation :
Negate long
Format :
lneg
Operand Stack :
..., value ..., result
Description :
The value must be of type long. It is popped from the operand stack. The long result is the arithmetic negation of value, -value. The result is pushed onto the operand stack.
For long values, negation is the same as subtraction from zero. Because the Java virtual machine uses twos-complement representation for integers and the range of twos-complement values is not symmetric, the negation of the maximum negative long results in that same maximum negative number. Despite the fact that overflow has occurred, no exception is thrown.
For all long values x, -x equals (~x) + 1.
Name : fneg
Opcode : 118(0x76)
Operation :
Negate float
Format :
fneg
Operand Stack :
..., value ..., result
Description :
The value must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting in value. The float result is the arithmetic negation of value. This result is pushed onto the operand stack.
For float values, negation is not the same as subtraction from zero. If x is +0.0, then 0.0-x equals +0.0, but -x equals -0.0. Unary minus merely inverts the sign of a float.
Special cases of interest:
If the operand is NaN, the result is NaN (recall that NaN has no sign).
If the operand is an infinity, the result is the infinity of opposite sign.
If the operand is a zero, the result is the zero of opposite sign.
Name : dneg
Opcode : 119(0x77)
Operation :
Negate double
Format :
dneg
Operand Stack :
..., value ..., result
Description :
The value must be of type double. It is popped from the operand stack and undergoes value set conversion, resulting in value. The double result is the arithmetic negation of value. The result is pushed onto the operand stack.
For double values, negation is not the same as subtraction from zero. If x is +0.0, then 0.0-x equals +0.0, but -x equals -0.0. Unary minus merely inverts the sign of a double.
Special cases of interest:
If the operand is NaN, the result is NaN (recall that NaN has no sign).
If the operand is an infinity, the result is the infinity of opposite sign.
If the operand is a zero, the result is the zero of opposite sign.
Name : ishl
Opcode : 120(0x78)
Operation :
Shift left int
Format :
ishl
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. An int result is calculated by shifting value1 left by s bit positions, where s is the value of the low 5 bits of value2. The result is pushed onto the operand stack.
Notes :
This is equivalent (even if overflow occurs) to multiplication by 2 to the power s. The shift distance actually used is always in the range 0 to 31, inclusive, as if value2 were subjected to a bitwise logical AND with the mask value 0x1f.
Name : lshl
Opcode : 121(0x79)
Operation :
Shift left
Format :
lshl
Operand Stack :
..., value1, value2 ..., result
Description :
The value1 must be of type long, and value2 must be of type int. The values are popped from the operand stack. A long result is calculated by shifting value1 left by s bit positions, where s is the low 6 bits of value2. The result is pushed onto the operand stack.
Notes :
This is equivalent (even if overflow occurs) to multiplication by 2 to the power s. The shift distance actually used is therefore always in the range 0 to 63, inclusive, as if value2 were subjected to a bitwise logical AND with the mask value 0x3f.
Name : ishr
Opcode : 122(0x7a)
Operation :
Arithmetic shift right int
Format :
ishr
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. An int result is calculated by shifting value1 right by s bit positions, with sign extension, where s is the value of the low 5 bits of value2. The result is pushed onto the operand stack.
Notes :
The resulting value is , where s is value2 & 0x1f. For nonnegative value1, this is equivalent to truncating int division by 2 to the power s. The shift distance actually used is always in the range 0 to 31, inclusive, as if value2 were subjected to a bitwise logical AND with the mask value 0x1f.
Name : lshr
Opcode : 123(0x7b)
Operation :
Arithmetic shift right long
Format :
lshr
Operand Stack :
..., value1, value2 ..., result
Description :
The value1 must be of type long, and value2 must be of type int. The values are popped from the operand stack. A long result is calculated by shifting value1 right by s bit positions, with sign extension, where s is the value of the low 6 bits of value2. The result is pushed onto the operand stack.
Notes :
The resulting value is , where s is value2 & 0x3f. For nonnegative value1, this is equivalent to truncating long division by 2 to the power s. The shift distance actually used is therefore always in the range 0 to 63, inclusive, as if value2 were subjected to a bitwise logical AND with the mask value 0x3f.
Name : iushr
Opcode : 124(0x7c)
Operation :
Logical shift right int
Format :
iushr
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. The values are popped from the operand stack. An int result is calculated by shifting value1 right by s bit positions, with zero extension, where s is the value of the low 5 bits of value2. The result is pushed onto the operand stack.
Notes :
If value1 is positive and s is value2 & 0x1f, the result is the same as that of value1 >> s; if value1 is negative, the result is equal to the value of the expression (value1 >> s) + (2 << ~s). The addition of the (2 << ~s) term cancels out the propagated sign bit. The shift distance actually used is always in the range 0 to 31, inclusive.
Name : lushr
Opcode : 125(0x7d)
Operation :
Logical shift right long
Format :
lushr
Operand Stack :
..., value1, value2 ..., result
Description :
The value1 must be of type long, and value2 must be of type int. The values are popped from the operand stack. A long result is calculated by shifting value1 right logically (with zero extension) by the amount indicated by the low 6 bits of value2. The result is pushed onto the operand stack.
Notes :
If value1 is positive and s is value2 & 0x3f, the result is the same as that of value1 >> s; if value1 is negative, the result is equal to the value of the expression (value1 >> s) + (2L << ~s). The addition of the (2L << ~s) term cancels out the propagated sign bit. The shift distance actually used is always in the range 0 to 63, inclusive.
Name : iand
Opcode : 126(0x7e)
Operation :
Boolean AND int
Format :
iand
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. They are popped from the operand stack. An int result is calculated by taking the bitwise AND (conjunction) of value1 and value2. The result is pushed onto the operand stack.
Name : land
Opcode : 127(0x7f)
Operation :
Boolean AND long
Format :
land
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. They are popped from the operand stack. A long result is calculated by taking the bitwise AND of value1 and value2. The result is pushed onto the operand stack.
Name : ior
Opcode : 128(0x80)
Operation :
Boolean OR int
Format :
ior
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. They are popped from the operand stack. An int result is calculated by taking the bitwise inclusive OR of value1 and value2. The result is pushed onto the operand stack.
Name : lor
Opcode : 129(0x81)
Operation :
Boolean OR long
Format :
lor
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. They are popped from the operand stack. A long result is calculated by taking the bitwise inclusive OR of value1 and value2. The result is pushed onto the operand stack.
Name : ixor
Opcode : 130(0x82)
Operation :
Boolean XOR int
Format :
ixor
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type int. They are popped from the operand stack. An int result is calculated by taking the bitwise exclusive OR of value1 and value2. The result is pushed onto the operand stack.
Name : lxor
Opcode : 131(0x83)
Operation :
Boolean XOR long
Format :
lxor
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. They are popped from the operand stack. A long result is calculated by taking the bitwise exclusive OR of value1 and value2. The result is pushed onto the operand stack.
Name : iinc
Opcode : 132(0x84)
Operation :
Increment local variable by constant
Format :
iinc
Operand Stack :
No change
Description :
The index is an unsigned byte that must be an index into the local variable array of the current frame. The const is an immediate signed byte. The local variable at index must contain an int. The value const is first sign-extended to an int, and then the local variable at index is incremented by that amount.
Notes :
The iinc opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index and to increment it by a two-byte immediate value.
Name : i2l
Opcode : 133(0x85)
Operation :
Convert int to long
Format :
i2l
Operand Stack :
..., value ..., result
Description :
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. That result is pushed onto the operand stack.
Notes :
The i2l instruction performs a widening primitive conversion. Because all values of type int are exactly representable by type long, the conversion is exact.
Name : i2f
Opcode : 134(0x86)
Operation :
Convert int to float
Format :
i2f
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type int. It is popped from the operand stack and converted to the float result using IEEE 754 round to nearest mode. The result is pushed onto the operand stack.
Notes :
The i2f instruction performs a widening primitive conversion, but may result in a loss of precision because values of type float have only 24 significand bits.
Name : i2d
Opcode : 135(0x87)
Operation :
Convert int to double
Format :
i2d
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type int. It is popped from the operand stack and converted to a double result. The result is pushed onto the operand stack.
Notes :
The i2d instruction performs a widening primitive conversion. Because all values of type int are exactly representable by type double, the conversion is exact.
Name : l2i
Opcode : 136(0x88)
Operation :
Convert long to int
Format :
l2i
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type long. It is popped from the operand stack and converted to an int result by taking the low-order 32 bits of the long value and discarding the high-order 32 bits. The result is pushed onto the operand stack.
Notes :
The l2i instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value. The result may also not have the same sign as value.
Name : l2f
Opcode : 137(0x89)
Operation :
Convert long to float
Format :
l2f
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type long. It is popped from the operand stack and converted to a float result using IEEE 754 round to nearest mode. The result is pushed onto the operand stack.
Notes :
The l2f instruction performs a widening primitive conversion that may lose precision because values of type float have only 24 significand bits.
Name : l2d
Opcode : 138(0x8a)
Operation :
Convert long to double
Format :
l2d
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type long. It is popped from the operand stack and converted to a double result using IEEE 754 round to nearest mode. The result is pushed onto the operand stack.
Notes :
The l2d instruction performs a widening primitive conversion that may lose precision because values of type double have only 53 significand bits.
Name : f2i
Opcode : 139(0x8b)
Operation :
Convert float to int
Format :
f2i
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting in value. Then value is converted to an int result. This result is pushed onto the operand stack:
If the value is NaN, the result of the conversion is an int 0.
Otherwise, if the value is not an infinity, it is rounded to an integer value V, rounding towards zero using IEEE 754 round towards zero mode. If this integer value V can be represented as an int, then the result is the int value V.
Otherwise, either the value must be too small (a negative value of large magnitude or negative infinity), and the result is the smallest representable value of type int, or the value must be too large (a positive value of large magnitude or positive infinity), and the result is the largest representable value of type int.
Notes :
The f2i instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value and may also lose precision.
Name : f2l
Opcode : 140(0x8c)
Operation :
Convert float to long
Format :
f2l
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting in value. Then value is converted to a long result. This result is pushed onto the operand stack:
If the value is NaN, the result of the conversion is a long 0.
Otherwise, if the value is not an infinity, it is rounded to an integer value V, rounding towards zero using IEEE 754 round towards zero mode. If this integer value V can be represented as a long, then the result is the long value V.
Otherwise, either the value must be too small (a negative value of large magnitude or negative infinity), and the result is the smallest representable value of type long, or the value must be too large (a positive value of large magnitude or positive infinity), and the result is the largest representable value of type long.
Notes :
The f2l instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value and may also lose precision.
Name : f2d
Opcode : 141(0x8d)
Operation :
Convert float to double
Format :
f2d
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type float. It is popped from the operand stack and undergoes value set conversion, resulting in value. Then value is converted to a double result. This result is pushed onto the operand stack.
Notes :
Where an f2d instruction is FP-strict it performs a widening primitive conversion. Because all values of the float value set are exactly representable by values of the double value set, such a conversion is exact.
Where an f2d instruction is not FP-strict, the result of the conversion may be taken from the double-extended-exponent value set; it is not necessarily rounded to the nearest representable value in the double value set. However, if the operand value is taken from the float-extended-exponent value set and the target result is constrained to the double value set, rounding of value may be required.
Name : d2i
Opcode : 142(0x8e)
Operation :
Convert double to int
Format :
d2i
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion resulting in value. Then value is converted to an int. The result is pushed onto the operand stack:
If the value is NaN, the result of the conversion is an int 0.
Otherwise, if the value is not an infinity, it is rounded to an integer value V, rounding towards zero using IEEE 754 round towards zero mode. If this integer value V can be represented as an int, then the result is the int value V.
Otherwise, either the value must be too small (a negative value of large magnitude or negative infinity), and the result is the smallest representable value of type int, or the value must be too large (a positive value of large magnitude or positive infinity), and the result is the largest representable value of type int.
Notes :
The d2i instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value and may also lose precision.
Name : d2l
Opcode : 143(0x8f)
Operation :
Convert double to long
Format :
d2l
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion resulting in value. Then value is converted to a long. The result is pushed onto the operand stack:
If the value is NaN, the result of the conversion is a long 0.
Otherwise, if the value is not an infinity, it is rounded to an integer value V, rounding towards zero using IEEE 754 round towards zero mode. If this integer value V can be represented as a long, then the result is the long value V.
Otherwise, either the value must be too small (a negative value of large magnitude or negative infinity), and the result is the smallest representable value of type long, or the value must be too large (a positive value of large magnitude or positive infinity), and the result is the largest representable value of type long.
Notes :
The d2l instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value and may also lose precision.
Name : d2f
Opcode : 144(0x90)
Operation :
Convert double to float
Format :
d2f
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type double. It is popped from the operand stack and undergoes value set conversion resulting in value. Then value is converted to a float result using IEEE 754 round to nearest mode. The result is pushed onto the operand stack.
Where an d2f instruction is FP-strict, the result of the conversion is always rounded to the nearest representable value in the float value set.
Where an d2f instruction is not FP-strict, the result of the conversion may be taken from the float-extended-exponent value set; it is not necessarily rounded to the nearest representable value in the float value set.
A finite value too small to be represented as a float is converted to a zero of the same sign; a finite value too large to be represented as a float is converted to an infinity of the same sign. A double NaN is converted to a float NaN.
Notes :
The d2f instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value and may also lose precision.
Name : i2b
Opcode : 145(0x91)
Operation :
Convert int to byte
Format :
i2b
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type int. It is popped from the operand stack, truncated to a byte, then sign-extended to an int result. That result is pushed onto the operand stack.
Notes :
The i2b instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value. The result may also not have the same sign as value.
Name : i2c
Opcode : 146(0x92)
Operation :
Convert int to char
Format :
i2c
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type int. It is popped from the operand stack, truncated to char, then zero-extended to an int result. That result is pushed onto the operand stack.
Notes :
The i2c instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value. The result (which is always positive) may also not have the same sign as value.
Name : i2s
Opcode : 147(0x93)
Operation :
Convert int to short
Format :
i2s
Operand Stack :
..., value ..., result
Description :
The value on the top of the operand stack must be of type int. It is popped from the operand stack, truncated to a short, then sign-extended to an int result. That result is pushed onto the operand stack.
Notes :
The i2s instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value. The result may also not have the same sign as value.
Name : lcmp
Opcode : 148(0x94)
Operation :
Compare long
Format :
lcmp
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type long. They are both popped from the operand stack, and a signed integer comparison is performed. If value1 is greater than value2, the int value 1 is pushed onto the operand stack. If value1 is equal to value2, the int value 0 is pushed onto the operand stack. If value1 is less than value2, the int value -1 is pushed onto the operand stack.
Name : fcmpl
Opcode : 149(0x95)
Operation :
Compare float
Format :
fcmp
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. A floating-point comparison is performed:
If value1 is greater than value2, the int value 1 is pushed onto the operand stack.
Otherwise, if value1 is equal to value2, the int value 0 is pushed onto the operand stack.
Otherwise, if value1 is less than value2, the int value -1 is pushed onto the operand stack.
Otherwise, at least one of value1 or value2 is NaN. The fcmpg instruction pushes the int value 1 onto the operand stack and the fcmpl instruction pushes the int value -1 onto the operand stack.
Floating-point comparison is performed in accordance with IEEE 754. All values other than NaN are ordered, with negative infinity less than all finite values and positive infinity greater than all finite values. Positive zero and negative zero are considered equal.
Notes :
The fcmpg and fcmpl instructions differ only in their treatment of a comparison involving NaN. NaN is unordered, so any float comparison fails if either or both of its operands are NaN. With both fcmpg and fcmpl available, any float comparison may be compiled to push the same result onto the operand stack whether the comparison fails on non-NaN values or fails because it encountered a NaN.
Name : fcmpg
Opcode : 150(0x96)
Operation :
Compare float
Format :
fcmpg
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type float. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. A floating-point comparison is performed:
If value1 is greater than value2, the int value 1 is pushed onto the operand stack.
Otherwise, if value1 is equal to value2, the int value 0 is pushed onto the operand stack.
Otherwise, if value1 is less than value2, the int value -1 is pushed onto the operand stack.
Otherwise, at least one of value1 or value2 is NaN. The fcmpg instruction pushes the int value 1 onto the operand stack and the fcmpl instruction pushes the int value -1 onto the operand stack.
Floating-point comparison is performed in accordance with IEEE 754. All values other than NaN are ordered, with negative infinity less than all finite values and positive infinity greater than all finite values. Positive zero and negative zero are considered equal.
Notes :
The fcmpg and fcmpl instructions differ only in their treatment of a comparison involving NaN. NaN is unordered, so any float comparison fails if either or both of its operands are NaN. With both fcmpg and fcmpl available, any float comparison may be compiled to push the same result onto the operand stack whether the comparison fails on non-NaN values or fails because it encountered a NaN.
Name : dcmpl
Opcode : 151(0x97)
Operation :
Compare double
Format :
dcmpl
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. A floating-point comparison is performed:
If value1 is greater than value2, the int value 1 is pushed onto the operand stack.
Otherwise, if value1 is equal to value2, the int value 0 is pushed onto the operand stack.
Otherwise, if value1 is less than value2, the int value -1 is pushed onto the operand stack.
Otherwise, at least one of value1 or or value2 is NaN. The dcmpg instruction pushes the int value 1 onto the operand stack and the dcmpl instruction pushes the int value -1 onto the operand stack.
Floating-point comparison is performed in accordance with IEEE 754. All values other than NaN are ordered, with negative infinity less than all finite values and positive infinity greater than all finite values. Positive zero and negative zero are considered equal.
Notes :
The dcmpg and dcmpl instructions differ only in their treatment of a comparison involving NaN. NaN is unordered, so any double comparison fails if either or both of its operands are NaN. With both dcmpg and dcmpl available, any double comparison may be compiled to push the same result onto the operand stack whether the comparison fails on non-NaN values or fails because it encountered a NaN.
Name : dcmpg
Opcode : 152(0x98)
Operation :
Compare double
Format :
dcmpg
Operand Stack :
..., value1, value2 ..., result
Description :
Both value1 and value2 must be of type double. The values are popped from the operand stack and undergo value set conversion, resulting in value1 and value2. A floating-point comparison is performed:
If value1 is greater than value2, the int value 1 is pushed onto the operand stack.
Otherwise, if value1 is equal to value2, the int value 0 is pushed onto the operand stack.
Otherwise, if value1 is less than value2, the int value -1 is pushed onto the operand stack.
Otherwise, at least one of value1 or value2 is NaN. The dcmpg instruction pushes the int value 1 onto the operand stack and the dcmpl instruction pushes the int value -1 onto the operand stack.
Floating-point comparison is performed in accordance with IEEE 754. All values other than NaN are ordered, with negative infinity less than all finite values and positive infinity greater than all finite values. Positive zero and negative zero are considered equal.
Notes :
The dcmpg and dcmpl instructions differ only in their treatment of a comparison involving NaN. NaN is unordered, so any double comparison fails if either or both of its operands are NaN. With both dcmpg and dcmpl available, any double comparison may be compiled to push the same result onto the operand stack whether the comparison fails on non-NaN values or fails because it encountered a NaN.
Name : ifeq
Opcode : 153(0x99)
Operation :
Branch if int comparison with zero succeeds
Format :
ifeq
Operand Stack :
..., value ...
Description :
The value must be of type int. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
succeeds if and only if value = 0
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifeq instruction. The target address must be that of an opcode of an instruction within the method that contains this ifeq instruction.
Otherwise, execution proceeds at the address of the instruction following this ifeq instruction.
Name : ifne
Opcode : 154(0x9a)
Operation :
Branch if int comparison with zero succeeds
Format :
ifne
Operand Stack :
..., value ...
Description :
The value must be of type int. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
succeeds if and only if value 0
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifne instruction. The target address must be that of an opcode of an instruction within the method that contains this ifne instruction.
Otherwise, execution proceeds at the address of the instruction following this ifne instruction.
Name : iflt
Opcode : 155(0x9b)
Operation :
Branch if int comparison with zero succeeds
Format :
iflt
Operand Stack :
..., value ...
Description :
The value must be of type int. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
succeeds if and only if value < 0
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this iflt instruction. The target address must be that of an opcode of an instruction within the method that contains this iflt instruction.
Otherwise, execution proceeds at the address of the instruction following this iflt instruction.
Name : ifge
Opcode : 156(0x9c)
Operation :
Branch if int comparison with zero succeeds
Format :
ifge
Operand Stack :
..., value ...
Description :
The value must be of type int. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
succeeds if and only if value 0
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifge instruction. The target address must be that of an opcode of an instruction within the method that contains this ifge instruction.
Otherwise, execution proceeds at the address of the instruction following this ifge instruction.
Name : ifgt
Opcode : 157(0x9d)
Operation :
Branch if int comparison with zero succeeds
Format :
ifgt
Operand Stack :
..., value ...
Description :
The value must be of type int. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
succeeds if and only if value > 0
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifgt instruction. The target address must be that of an opcode of an instruction within the method that contains this ifgt instruction.
Otherwise, execution proceeds at the address of the instruction following this ifgt instruction.
Name : ifle
Opcode : 158(0x9e)
Operation :
Branch if int comparison with zero succeeds
Format :
ifle
Operand Stack :
..., value ...
Description :
The value must be of type int. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
succeeds if and only if value 0
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifle instruction. The target address must be that of an opcode of an instruction within the method that contains this ifle instruction.
Otherwise, execution proceeds at the address of the instruction following this ifle instruction.
Name : if_icmpeq
Opcode : 159(0x9f)
Operation :
Branch if int comparison succeeds
Format :
if_icmpne
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type int. They are both popped from the operand stack and compared. All comparisons are signed. The results of the comparison are as follows:
succeeds if and only if value1 > value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_icmpeq instruction. The target address must be that of an opcode of an instruction within the method that contains this if_icmpeq instruction.
Otherwise, execution proceeds at the address of the instruction following this if_icmpeq instruction.
Name : if_icmpne
Opcode : 160(0xa0)
Operation :
Branch if int comparison succeeds
Format :
if_icmpne
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type int. They are both popped from the operand stack and compared. All comparisons are signed. The results of the comparison are as follows:
succeeds if and only if value1 != value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_icmpne instruction. The target address must be that of an opcode of an instruction within the method that contains this if_icmp instruction.
Otherwise, execution proceeds at the address of the instruction following this if_icmpne instruction.
Name : if_icmplt
Opcode : 161(0xa1)
Operation :
Branch if int comparison succeeds
Format :
if_icmplt
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type int. They are both popped from the operand stack and compared. All comparisons are signed. The results of the comparison are as follows:
lt succeeds if and only if value1 < value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_icmplt instruction. The target address must be that of an opcode of an instruction within the method that contains this if_icmplt instruction.
Otherwise, execution proceeds at the address of the instruction following this if_icmplt instruction.
Name : if_icmpge
Opcode : 162(0xa2)
Operation :
Branch if int comparison succeeds
Format :
if_icmpge
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type int. They are both popped from the operand stack and compared. All comparisons are signed. The results of the comparison are as follows:
succeeds if and only if value1 >= value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_icmpge instruction. The target address must be that of an opcode of an instruction within the method that contains this if_icmpge instruction.
Otherwise, execution proceeds at the address of the instruction following this if_icmpge instruction.
Name : if_icmpgt
Opcode : 163(0xa3)
Operation :
Branch if int comparison succeeds
Format :
if_icmpgt>
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type int. They are both popped from the operand stack and compared. All comparisons are signed. The results of the comparison are as follows:
gt succeeds if and only if value1 > value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_icmpgt instruction. The target address must be that of an opcode of an instruction within the method that contains this if_icmpgt instruction.
Otherwise, execution proceeds at the address of the instruction following this if_icmpgt instruction.
Name : if_icmple
Opcode : 164(0xa4)
Operation :
Branch if int comparison succeeds
Format :
if_icmple
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type int. They are both popped from the operand stack and compared. All comparisons are signed. The results of the comparison are as follows:
succeeds if and only if value1 <= value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_icmple instruction. The target address must be that of an opcode of an instruction within the method that contains this if_icmple instruction.
Otherwise, execution proceeds at the address of the instruction following this if_icmple instruction.
Name : if_acmpeq
Opcode : 165(0xa5)
Operation :
Branch if reference comparison succeeds
Format :
if_acmpeq
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type reference. They are both popped from the operand stack and compared. The results of the comparison are as follows:
succeeds if and only if value1 = value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_acmpeq instruction. The target address must be that of an opcode of an instruction within the method that contains this if_acmpeq instruction.
Otherwise, if the comparison fails, execution proceeds at the address of the instruction following this if_acmpeq instruction.
Name : if_acmpne
Opcode : 166(0xa6)
Operation :
Branch if reference comparison succeeds
Format :
if_acmpne
Operand Stack :
..., value1, value2 ...
Description :
Both value1 and value2 must be of type reference. They are both popped from the operand stack and compared. The results of the comparison are as follows:
succeeds if and only if value1 value2
If the comparison succeeds, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this if_acmpne instruction. The target address must be that of an opcode of an instruction within the method that contains this if_acmpne instruction.
Otherwise, if the comparison fails, execution proceeds at the address of the instruction following this if_acmpne instruction.
Name : goto
Opcode : 167(0xa7)
Operation :
Branch always
Format :
goto
Operand Stack :
No change
Description :
The unsigned bytes branchbyte1 and branchbyte2 are used to construct a signed 16-bit branchoffset, where branchoffset is (branchbyte1 << 8) | branchbyte2. Execution proceeds at that offset from the address of the opcode of this goto instruction. The target address must be that of an opcode of an instruction within the method that contains this goto instruction.
Name : jsr
Opcode : 168(0xa8)
Operation :
Jump subroutine
Format :
jsr
Operand Stack :
... ..., address
Description :
The address of the opcode of the instruction immediately following this jsr instruction is pushed onto the operand stack as a value of type returnAddress. The unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is (branchbyte1 << 8) | branchbyte2. Execution proceeds at that offset from the address of this jsr instruction. The target address must be that of an opcode of an instruction within the method that contains this jsr instruction.
Notes :
The jsr instruction is used with the ret instruction in the implementation of the finally clauses of the Java programming language. Note that jsr pushes the address onto the operand stack and ret gets it out of a local variable. This asymmetry is intentional.
Name : ret
Opcode : 169(0xa9)
Operation :
Return from subroutine
Format :
ret
Operand Stack :
No change
Description :
The index is an unsigned byte between 0 and 255, inclusive. The local variable at index in the current frame must contain a value of type returnAddress. The contents of the local variable are written into the Java virtual machines pc register, and execution continues there.
Notes :
The ret instruction is used with jsr or jsr_w instructions in the implementation of the finally clauses of the Java programming language. Note that jsr pushes the address onto the operand stack and ret gets it out of a local variable. This asymmetry is intentional.
The ret instruction should not be confused with the return instruction. A return instruction returns control from a method to its invoker, without passing any value back to the invoker.
The ret opcode can be used in conjunction with the wide instruction to access a local variable using a two-byte unsigned index.
Name : tableswitch
Opcode : 170(0xaa)
Operation :
Access jump table by index and jump
Format :
tableswitch
Operand Stack :
..., index ...
Description :
A tableswitch is a variable-length instruction. Immediately after the tableswitch opcode, between 0 and 3 null bytes (zeroed bytes, not the null object) are inserted as padding. The number of null bytes is chosen so that the following byte begins at an address that is a multiple of 4 bytes from the start of the current method (the opcode of its first instruction). Immediately after the padding follow bytes constituting three signed 32-bit values: default, low, and high. Immediately following those bytes are bytes constituting a series of high - low + 1 signed 32-bit offsets. The value low must be less than or equal to high. The high - low + 1 signed 32-bit offsets are treated as a 0-based jump table. Each of these signed 32-bit values is constructed as (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4.
The index must be of type int and is popped from the operand stack. If index is less than low or index is greater than high, then a target address is calculated by adding default to the address of the opcode of this tableswitch instruction. Otherwise, the offset at position index - low of the jump table is extracted. The target address is calculated by adding that offset to the address of the opcode of this tableswitch instruction. Execution then continues at the target address.
The target address that can be calculated from each jump table offset, as well as the ones that can be calculated from default, must be the address of an opcode of an instruction within the method that contains this tableswitch instruction.
Notes :
The alignment required of the 4-byte operands of the tableswitch instruction guarantees 4-byte alignment of those operands if and only if the method that contains the tableswitch starts on a 4-byte boundary.
Name : lookupswitch
Opcode : 171(0xab)
Operation :
Access jump table by key match and jump
Format :
lookupswitch
Operand Stack :
..., key ...
Description :
A lookupswitch is a variable-length instruction. Immediately after the lookupswitch opcode, between zero and three null bytes (zeroed bytes, not the null object) are inserted as padding. The number of null bytes is chosen so that the defaultbyte1 begins at an address that is a multiple of four bytes from the start of the current method (the opcode of its first instruction). Immediately after the padding follow a series of signed 32-bit values: default, npairs, and then npairs pairs of signed 32-bit values. The npairs must be greater than or equal to 0. Each of the npairs pairs consists of an int match and a signed 32-bit offset. Each of these signed 32-bit values is constructed from four unsigned bytes as (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4.
The table match-offset pairs of the lookupswitch instruction must be sorted in increasing numerical order by match.
The key must be of type int and is popped from the operand stack. The key is compared against the match values. If it is equal to one of them, then a target address is calculated by adding the corresponding offset to the address of the opcode of this lookupswitch instruction. If the key does not match any of the match values, the target address is calculated by adding default to the address of the opcode of this lookupswitch instruction. Execution then continues at the target address.
The target address that can be calculated from the offset of each match-offset pair, as well as the one calculated from default, must be the address of an opcode of an instruction within the method that contains this lookupswitch instruction.
Notes :
The alignment required of the 4-byte operands of the lookupswitch instruction guarantees 4-byte alignment of those operands if and only if the method that contains the lookupswitch is positioned on a 4-byte boundary.
The match-offset pairs are sorted to support lookup routines that are quicker than linear search.
Name : ireturn
Opcode : 172(0xac)
Operation :
Return int from method
Format :
ireturn
Operand Stack :
..., value [empty]
Description :
The current method must have return type boolean, byte, short, char, or int. The value must be of type int. If the current method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. If no exception is thrown, value is popped from the operand stack of the current frame and pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded.
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.
Runtime Exceptions :
If the current method is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, ireturn throws an IllegalMonitorStateException. This can happen, for example, if a synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the first of those rules is violated during invocation of the current method, then ireturn throws an IllegalMonitorStateException.
Name : lreturn
Opcode : 173(0xad)
Operation :
Return long from method
Format :
lreturn
Operand Stack :
..., value [empty]
Description :
The current method must have return type long. The value must be of type long. If the current method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. If no exception is thrown, value is popped from the operand stack of the current frame and pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded.
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.
Runtime Exceptions :
If the current method is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, lreturn throws an IllegalMonitorStateException. This can happen, for example, if a synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the first of those rules is violated during invocation of the current method, then lreturn throws an IllegalMonitorStateException.
Name : freturn
Opcode : 174(0xae)
Operation :
Return float from method
Format :
freturn
Operand Stack :
..., value [empty]
Description :
The current method must have return type float. The value must be of type float. If the current method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. If no exception is thrown, value is popped from the operand stack of the current frame and undergoes value set conversion, resulting in value. The value is pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded.
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.
Runtime Exceptions :
If the current method is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, freturn throws an IllegalMonitorStateException. This can happen, for example, if a synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the first of those rules is violated during invocation of the current method, then freturn throws an IllegalMonitorStateException.
Name : dreturn
Opcode : 175(0xaf)
Operation :
Return double from method
Format :
dreturn
Operand Stack :
..., value [empty]
Description :
The current method must have return type double. The value must be of type double. If the current method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. If no exception is thrown, value is popped from the operand stack of the current frame and undergoes value set conversion, resulting in value. The value is pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded.
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.
Runtime Exceptions :
If the current method is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, dreturn throws an IllegalMonitorStateException. This can happen, for example, if a synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the first of those rules is violated during invocation of the current method, then dreturn throws an IllegalMonitorStateException.
Name : areturn
Opcode : 176(0xb0)
Operation :
Return reference from method
Format :
areturn
Operand Stack :
..., objectref [empty]
Description :
The objectref must be of type reference and must refer to an object of a type that is assignment compatible with the type represented by the return descriptor of the current method. If the current method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. If no exception is thrown, objectref is popped from the operand stack of the current frame and pushed onto the operand stack of the frame of the invoker. Any other values on the operand stack of the current method are discarded.
The interpreter then reinstates the frame of the invoker and returns control to the invoker.
Runtime Exceptions :
If the current method is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, areturn throws an IllegalMonitorStateException. This can happen, for example, if a synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the first of those rules is violated during invocation of the current method, then areturn throws an IllegalMonitorStateException.
Name : return
Opcode : 177(0xb1)
Operation :
Return void from method
Format :
return
Operand Stack :
... [empty]
Description :
The current method must have return type void. If the current method is a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. If no exception is thrown, any values on the operand stack of the current frame are discarded.
The interpreter then returns control to the invoker of the method, reinstating the frame of the invoker.
Runtime Exceptions :
If the current method is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, return throws an IllegalMonitorStateException. This can happen, for example, if a synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the first of those rules is violated during invocation of the current method, then return throws an IllegalMonitorStateException.
Name : getstatic
Opcode : 178(0xb2)
Operation :
Get static field from class
Format :
getstatic
Operand Stack :
..., ..., value
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a field, which gives the name and descriptor of the field as well as a symbolic reference to the class or interface in which the field is to be found. The referenced field is resolved.
On successful resolution of the field, the class or interface that declared the resolved field is initialized if that class or interface has not already been initialized.
The value of the class or interface field is fetched and pushed onto the operand stack.
Linking Exceptions :
During resolution of the symbolic reference to the class or interface field, any of the exceptions pertaining to field resolution documented in Section 5.4.3.2 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved field is not a static (class) field or an interface field, getstatic throws an IncompatibleClassChangeError.
Runtime Exceptions :
Otherwise, if execution of this getstatic instruction causes initialization of the referenced class or interface, getstatic may throw an Error as detailed in Section 2.17.5 of Java Virtual Machine Specification.
Name : putstatic
Opcode : 179(0xb3)
Operation :
Set static field in class
Format :
putstatic
Operand Stack :
..., value ...
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a field, which gives the name and descriptor of the field as well as a symbolic reference to the class or interface in which the field is to be found. The referenced field is resolved.
On successful resolution of the field the class or interface that declared the resolved field is initialized if that class or interface has not already been initialized.
The type of a value stored by a putstatic instruction must be compatible with the descriptor of the referenced field. If the field descriptor type is boolean, byte, char, short, or int, then the value must be an int. If the field descriptor type is float, long, or double, then the value must be a float, long, or double, respectively. If the field descriptor type is a reference type, then the value must be of a type that is assignment compatible with the field descriptor type. If the field is final, it should be declared in the current class. Otherwise, an IllegalAccessError is thrown.
The value is popped from the operand stack and undergoes value set conversion, resulting in value. The class field is set to value.
Linking Exceptions :
During resolution of the symbolic reference to the class or interface field, any of the exceptions pertaining to field resolution documented in Section 5.4.3.2 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved field is not a static (class) field or an interface field, putstatic throws an IncompatibleClassChangeError.
Otherwise, if the field is final, it must be declared in the current class. Otherwise, an IllegalAccessError is thrown.
Runtime Exceptions :
Otherwise, if execution of this putstatic instruction causes initialization of the referenced class or interface, putstatic may throw an Error as detailed in Section 2.17.5 of Java Virtual Machine Specification.
Notes :
A putstatic instruction may be used only to set the value of an interface field on the initialization of that field. Interface fields may be assigned to only once, on execution of an interface variable initialization expression when the interface is initialized.
Name : getfield
Opcode : 180(0xb4)
Operation :
Fetch field from object
Format :
getfield
Operand Stack :
..., objectref ..., value
Description :
The objectref, which must be of type reference, is popped from the operand stack. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a field, which gives the name and descriptor of the field as well as a symbolic reference to the class in which the field is to be found. The referenced field is resolved. The value of the referenced field in objectref is fetched and pushed onto the operand stack.
The class of objectref must not be an array. If the field is protected, and it is either a member of the current class or a member of a superclass of the current class, then the class of objectref must be either the current class or a subclass of the current class.
Linking Exceptions :
During resolution of the symbolic reference to the field, any of the errors pertaining to field resolution documented in Section 5.4.3.2 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved field is a static field, getfield throws an IncompatibleClassChangeError.
Runtime Exceptions :
Otherwise, if objectref is null, the getfield instruction throws a NullPointerException.
Notes :
The getfield instruction cannot be used to access the length field of an array. The arraylength instruction is used instead.
Name : putfield
Opcode : 181(0xb5)
Operation :
Set field in object
Format :
putfield
Operand Stack :
..., objectref, value ...
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a field, which gives the name and descriptor of the field as well as a symbolic reference to the class in which the field is to be found. The class of objectref must not be an array. If the field is protected, and it is either a member of the current class or a member of a superclass of the current class, then the class of objectref must be either the current class or a subclass of the current class.
The referenced field is resolved. The type of a value stored by a putfield instruction must be compatible with the descriptor of the referenced field. If the field descriptor type is boolean, byte, char, short, or int, then the value must be an int. If the field descriptor type is float, long, or double, then the value must be a float, long, or double, respectively. If the field descriptor type is a reference type, then the value must be of a type that is assignment compatible with the field descriptor type. If the field is final, it should be declared in the current class. Otherwise, an IllegalAccessError is thrown.
The value and objectref are popped from the operand stack. The objectref must be of type reference. The value undergoes value set conversion, resulting in value, and the referenced field in objectref is set to value.
Linking Exceptions :
During resolution of the symbolic reference to the field, any of the exceptions pertaining to field resolution documented in Section 5.4.3.2 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved field is a static field, putfield throws an IncompatibleClassChangeError.
Otherwise, if the field is final, it must be declared in the current class. Otherwise, an IllegalAccessError is thrown.
Runtime Exceptions :
Otherwise, if objectref is null, the putfield instruction throws a NullPointerException.
Name : invokevirtual
Opcode : 182(0xb6)
Operation :
Invoke instance method; dispatch based on class
Format :
invokevirtual
Operand Stack :
..., objectref, [arg1, [arg2 ...]] ...
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a method, which gives the name and descriptor of the method as well as a symbolic reference to the class in which the method is to be found. The named method is resolved. The method must not be an instance initialization method or the class or interface initialization method. Finally, if the resolved method is protected, and it is either a member of the current class or a member of a superclass of the current class, then the class of objectref must be either the current class or a subclass of the current class.
Let C be the class of objectref. The actual method to be invoked is selected by the following lookup procedure:
If C contains a declaration for an instance method with the same name and descriptor as the resolved method, and the resolved method is accessible from C, then this is the method to be invoked, and the lookup procedure terminates.
Otherwise, if C has a superclass, this same lookup procedure is performed recursively using the direct superclass of C ; the method to be invoked is the result of the recursive invocation of this lookup procedure.
Otherwise, an AbstractMethodError is raised.
The objectref must be followed on the operand stack by nargs argument values, where the number, type, and order of the values must be consistent with the descriptor of the selected instance method.
If the method is synchronized, the monitor associated with objectref is acquired or reentered.
If the method is not native, the nargs argument values and objectref are popped from the operand stack. A new frame is created on the Java virtual machine stack for the method being invoked. The objectref and the argument values are consecutively made the values of local variables of the new frame, with objectref in local variable 0, arg1 in local variable 1 (or, if arg1 is of type long or double, in local variables 1 and 2), and so on. Any argument value that is of a floating-point type undergoes value set conversion prior to being stored in a local variable. The new frame is then made current, and the Java virtual machine pc is set to the opcode of the first instruction of the method to be invoked. Execution continues with the first instruction of the method.
If the method is native and the platform-dependent code that implements it has not yet been bound into the Java virtual machine, that is done. The nargs argument values and objectref are popped from the operand stack and are passed as parameters to the code that implements the method. Any argument value that is of a floating-point type undergoes value set conversion prior to being passed as a parameter. The parameters are passed and the code is invoked in an implementation-dependent manner. When the platform-dependent code returns, the following take place:
If the native method is synchronized, the monitor associated with objectref is released or exited as if by execution of a monitorexit instruction.
If the native method returns a value, the return value of the platform-dependent code is converted in an implementation-dependent way to the return type of the native method and pushed onto the operand stack.
Linking Exceptions :
During resolution of the symbolic reference to the method, any of the exceptions pertaining to method resolution documented in Section 5.4.3.3 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved method is a class (static) method, the invokevirtual instruction throws an IncompatibleClassChangeError.
Runtime Exceptions :
Otherwise, if objectref is null, the invokevirtual instruction throws a NullPointerException.
Otherwise, if no method matching the resolved name and descriptor is selected, invokevirtual throws an AbstractMethodError.
Otherwise, if the selected method is abstract, invokevirtual throws an AbstractMethodError.
Otherwise, if the selected method is native and the code that implements the method cannot be bound, invokevirtual throws an UnsatisfiedLinkError.
Name : invokespecial
Opcode : 183(0xb7)
Operation :
Invoke instance method; special handling for superclass, private, and instance initialization method invocations
Format :
invokespecial
Operand Stack :
..., objectref, [arg1, [arg2 ...]] ...
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a method, which gives the name and descriptor of the method as well as a symbolic reference to the class in which the method is to be found. The named method is resolved. Finally, if the resolved method is protected, and it is either a member of the current class or a member of a superclass of the current class, then the class of objectref must be either the current class or a subclass of the current class.
Next, the resolved method is selected for invocation unless all of the following conditions are true:
The ACC_SUPER flag (see Table 4.1, "Class access and property modifiers") is set for the current class.
The class of the resolved method is a superclass of the current class.
The resolved method is not an instance initialization method.
If the above conditions are true, the actual method to be invoked is selected by the following lookup procedure. Let C be the direct superclass of the current class:
If C contains a declaration for an instance method with the same name and descriptor as the resolved method, then this method will be invoked. The lookup procedure terminates.
Otherwise, if C has a superclass, this same lookup procedure is performed recursively using the direct superclass of C. The method to be invoked is the result of the recursive invocation of this lookup procedure.
Otherwise, an AbstractMethodError is raised.
The objectref must be of type reference and must be followed on the operand stack by nargs argument values, where the number, type, and order of the values must be consistent with the descriptor of the selected instance method.
If the method is synchronized, the monitor associated with objectref is acquired or reentered.
If the method is not native, the nargs argument values and objectref are popped from the operand stack. A new frame is created on the Java virtual machine stack for the method being invoked. The objectref and the argument values are consecutively made the values of local variables of the new frame, with objectref in local variable 0, arg1 in local variable 1 (or, if arg1 is of type long or double, in local variables 1 and 2), and so on. Any argument value that is of a floating-point type undergoes value set conversion prior to being stored in a local variable. The new frame is then made current, and the Java virtual machine pc is set to the opcode of the first instruction of the method to be invoked. Execution continues with the first instruction of the method.
If the method is native and the platform-dependent code that implements it has not yet been bound into the Java virtual machine, that is done. The nargs argument values and objectref are popped from the operand stack and are passed as parameters to the code that implements the method. Any argument value that is of a floating-point type undergoes value set conversion prior to being passed as a parameter. The parameters are passed and the code is invoked in an implementation-dependent manner. When the platform-dependent code returns, the following take place:
If the native method is synchronized, the monitor associated with objectref is released or exited as if by execution of a monitorexit instruction.
If the native method returns a value, the return value of the platform-dependent code is converted in an implementation-dependent way to the return type of the native method and pushed onto the operand stack.
Linking Exceptions :
During resolution of the symbolic reference to the method, any of the exceptions pertaining to method resolution documented in Section 5.4.3.3 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved method is an instance initialization method, and the class in which it is declared is not the class symbolically referenced by the instruction, a NoSuchMethodError is thrown.
Otherwise, if the resolved method is a class (static) method, the invokespecial instruction throws an IncompatibleClassChangeError.
Otherwise, if no method matching the resolved name and descriptor is selected, invokespecial throws an AbstractMethodError.
Otherwise, if the selected method is abstract, invokespecial throws an AbstractMethodError.
Runtime Exceptions :
Otherwise, if objectref is null, the invokespecial instruction throws a NullPointerException.
Otherwise, if the selected method is native and the code that implements the method cannot be bound, invokespecial throws an UnsatisfiedLinkError.
Name : invokestatic
Opcode : 184(0xb8)
Operation :
Invoke a class (static) method
Format :
invokestatic
Operand Stack :
..., [arg1, [arg2 ...]] ...
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a method, which gives the name and descriptor of the method as well as a symbolic reference to the class in which the method is to be found. The named method is resolved. The method must not be the class or interface initialization method. It must be static, and therefore cannot be abstract.
On successful resolution of the method, the class that declared the resolved field is initialized if that class has not already been initialized.
The operand stack must contain nargs argument values, where the number, type, and order of the values must be consistent with the descriptor of the resolved method.
If the method is synchronized, the monitor associated with the resolved class is acquired or reentered.
If the method is not native, the nargs argument values are popped from the operand stack. A new frame is created on the Java virtual machine stack for the method being invoked. The nargs argument values are consecutively made the values of local variables of the new frame, with arg1 in local variable 0 (or, if arg1 is of type long or double, in local variables 0 and 1) and so on. Any argument value that is of a floating-point type undergoes value set conversion prior to being stored in a local variable. The new frame is then made current, and the Java virtual machine pc is set to the opcode of the first instruction of the method to be invoked. Execution continues with the first instruction of the method.
If the method is native and the platform-dependent code that implements it has not yet been bound into the Java virtual machine, that is done. The nargs argument values are popped from the operand stack and are passed as parameters to the code that implements the method. Any argument value that is of a floating-point type undergoes value set conversion prior to being passed as a parameter. The parameters are passed and the code is invoked in an implementation-dependent manner. When the platform-dependent code returns, the following take place:
If the native method is synchronized, the monitor associated with the resolved class is released or exited as if by execution of a monitorexit instruction.
If the native method returns a value, the return value of the platform-dependent code is converted in an implementation-dependent way to the return type of the native method and pushed onto the operand stack.
Linking Exceptions :
During resolution of the symbolic reference to the method, any of the exceptions pertaining to method resolution documented in Section 5.4.3.3 of Java Virtual Machine Specification can be thrown.
Otherwise, if the resolved method is an instance method, the invokestatic instruction throws an IncompatibleClassChangeError.
Runtime Exceptions :
Otherwise, if execution of this invokestatic instruction causes initialization of the referenced class, invokestatic may throw an Error as detailed in Section 2.17.5 of Java Virtual Machine Specification.
Otherwise, if the resolved method is native and the code that implements the method cannot be bound, invokestatic throws an UnsatisfiedLinkError.
Name : invokeinterface
Opcode : 185(0xb9)
Operation :
Invoke interface method
Format :
invokeinterface
Operand Stack :
..., objectref, [arg1, [arg2 ...]] ...
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to an interface method, which gives the name and descriptor of the interface method as well as a symbolic reference to the interface in which the interface method is to be found. The named interface method is resolved. The interface method must not be an instance initialization method or the class or interface initialization method.
The count operand is an unsigned byte that must not be zero. The objectref must be of type reference and must be followed on the operand stack by nargs argument values, where the number, type, and order of the values must be consistent with the descriptor of the resolved interface method. The value of the fourth operand byte must always be zero.
Let C be the class of objectref. The actual method to be invoked is selected by the following lookup procedure:
If C contains a declaration for an instance method with the same name and descriptor as the resolved method, then this is the method to be invoked, and the lookup procedure terminates.
Otherwise, if C has a superclass, this same lookup procedure is performed recursively using the direct superclass of C; the method to be invoked is the result of the recursive invocation of this lookup procedure.
Otherwise, an AbstractMethodError is raised.
If the method is synchronized, the monitor associated with objectref is acquired or reentered.
If the method is not native, the nargs argument values and objectref are popped from the operand stack. A new frame is created on the Java virtual machine stack for the method being invoked. The objectref and the argument values are consecutively made the values of local variables of the new frame, with objectref in local variable 0, arg1 in local variable 1 (or, if arg1 is of type long or double, in local variables 1 and 2), and so on. Any argument value that is of a floating-point type undergoes value set conversion prior to being stored in a local variable. The new frame is then made current, and the Java virtual machine pc is set to the opcode of the first instruction of the method to be invoked. Execution continues with the first instruction of the method.
If the method is native and the platform-dependent code that implements it has not yet been bound into the Java virtual machine, that is done. The nargs argument values and objectref are popped from the operand stack and are passed as parameters to the code that implements the method. Any argument value that is of a floating-point type undergoes value set conversion prior to being passed as a parameter. The parameters are passed and the code is invoked in an implementation-dependent manner. When the platform-dependent code returns:
If the native method is synchronized, the monitor associated with objectref is released or exited as if by execution of a monitorexit instruction.
If the native method returns a value, the return value of the platform-dependent code is converted in an implementation-dependent way to the return type of the native method and pushed onto the operand stack.
Linking Exceptions :
During resolution of the symbolic reference to the interface method, any of the exceptions documented in Section 5.4.3.4 of Java Virtual Machine Specification can be thrown.
Runtime Exceptions :
Otherwise, if objectref is null, the invokeinterface instruction throws a NullPointerException.
Otherwise, if the class of objectref does not implement the resolved interface, invokeinterface throws an IncompatibleClassChangeError.
Otherwise, if no method matching the resolved name and descriptor is selected, invokeinterface throws an AbstractMethodError.
Otherwise, if the selected method is not public, invokeinterface throws an IllegalAccessError.
Otherwise, if the selected method is abstract, invokeinterface throws an AbstractMethodError.
Otherwise, if the selected method is native and the code that implements the method cannot be bound, invokeinterface throws an UnsatisfiedLinkError.
Name : new
Opcode : 187(0xbb)
Operation :
Create new object
Format :
new
Operand Stack :
... ..., objectref
Description :
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at the index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved and should result in a class type (it should not result in an array or interface type). Memory for a new instance of that class is allocated from the garbage-collected heap, and the instance variables of the new object are initialized to their default initial values. The objectref, a reference to the instance, is pushed onto the operand stack.
On successful resolution of the class, it is initialized if it has not already been initialized.
Linking Exceptions :
During resolution of the symbolic reference to the class, array, or interface type, any of the exceptions documented in Section 5.4.3.1 of Java Virtual Machine Specification can be thrown.
Otherwise, if the symbolic reference to the class, array, or interface type resolves to an interface or is an abstract class, new throws an InstantiationError.
Runtime Exceptions :
Otherwise, if execution of this new instruction causes initialization of the referenced class, new may throw an Error as detailed in Section 2.17.5 of Java Virtual Machine Specification.
Notes :
The new instruction does not completely create a new instance; instance creation is not completed until an instance initialization method has been invoked on the uninitialized instance.
Name : newarray
Opcode : 188(0xbc)
Operation :
Create new array
Format :
newarray
Operand Stack :
..., count ..., arrayref
Description :
The count must be of type int. It is popped off the operand stack. The count represents the number of elements in the array to be created.
The atype is a code that indicates the type of array to create. It must take one of the following values:
Array Type atype
T_BOOLEAN 4
T_CHAR 5
T_FLOAT 6
T_DOUBLE 7
T_BYTE 8
T_SHORT 9
T_INT 10
T_LONG 11
A new array whose components are of type atype and of length count is allocated from the garbage-collected heap. A reference arrayref to this new array object is pushed into the operand stack. Each of the elements of the new array is initialized to the default initial value for the type of the array.
Runtime Exceptions :
If count is less than zero, newarray throws a NegativeArraySizeException.
Notes :
In Suns implementation of the Java virtual machine, arrays of type boolean (atype is T_BOOLEAN) are stored as arrays of 8-bit values and are manipulated using the baload and bastore instructions, instructions that also access arrays of type byte. Other implementations may implement packed boolean arrays; the baload and bastore instructions must still be used to access those arrays.
Name : anewarray
Opcode : 189(0xbd)
Operation :
Create new array of reference
Format :
anewarray
Operand Stack :
..., count ..., arrayref
Description :
The count must be of type int. It is popped off the operand stack. The count represents the number of components of the array to be created. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at that index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved. A new array with components of that type, of length count, is allocated from the garbage-collected heap, and a reference arrayref to this new array object is pushed onto the operand stack. All components of the new array are initialized to null, the default value for reference types.
Linking Exceptions :
During resolution of the symbolic reference to the class, array, or interface type, any of the exceptions documented in Section 5.4.3.1 of Java Virtual Machine Specification can be thrown.
Runtime Exceptions :
Otherwise, if count is less than zero, the anewarray instruction throws a NegativeArraySizeException.
Notes :
The anewarray instruction is used to create a single dimension of an array of object references or part of a multidimensional array.
Name : arraylength
Opcode : 190(0xbe)
Operation :
Get length of array
Format :
arraylength
Operand Stack :
..., arrayref ..., length
Description :
The arrayref must be of type reference and must refer to an array. It is popped from the operand stack. The length of the array it references is determined. That length is pushed onto the operand stack as an int.
Runtime Exceptions :
If the arrayref is null, the arraylength instruction throws a NullPointerException.
Name : athrow
Opcode : 191(0xbf)
Operation :
Throw exception or error
Format :
athrow
Operand Stack :
..., objectref objectref
Description :
The objectref must be of type reference and must refer to an object that is an instance of class Throwable or of a subclass of Throwable. It is popped from the operand stack. The objectref is then thrown by searching the current method for the first exception handler that matches the class of objectref, as given by the algorithm in Section 3.10 of Java Virtual Machine Specification.
If an exception handler that matches objectref is found, it contains the location of the code intended to handle this exception. The pc register is reset to that location, the operand stack of the current frame is cleared, objectref is pushed back onto the operand stack, and execution continues.
If no matching exception handler is found in the current frame, that frame is popped. If the current frame represents an invocation of a synchronized method, the monitor acquired or reentered on invocation of the method is released or exited (respectively) as if by execution of a monitorexit instruction. Finally, the frame of its invoker is reinstated, if such a frame exists, and the objectref is rethrown. If no such frame exists, the current thread exits.
Runtime Exceptions :
If objectref is null, athrow throws a NullPointerException instead of objectref.
Otherwise, if the method of the current frame is a synchronized method and the current thread is not the owner of the monitor acquired or reentered on invocation of the method, athrow throws an IllegalMonitorStateException instead of the object previously being thrown. This can happen, for example, if an abruptly completing synchronized method contains a monitorexit instruction, but no monitorenter instruction, on the object on which the method is synchronized.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Sepcification and if the first of those rules is violated during invocation of the current method, then athrow throws an IllegalMonitorStateException instead of the object previously being thrown.
Name : checkcast
Opcode : 192(0xc0)
Operation :
Check whether object is of given type
Format :
checkcast
Operand Stack :
..., objectref ..., objectref
Description :
The objectref must be of type reference. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at the index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved.
If objectref is null or can be cast to the resolved class, array, or interface type, the operand stack is unchanged; otherwise, the checkcast instruction throws a ClassCastException.
The following rules are used to determine whether an objectref that is not null can be cast to the resolved type: if S is the class of the object referred to by objectref and T is the resolved class, array, or interface type, checkcast determines whether objectref can be cast to type T as follows:
If S is an ordinary (nonarray) class, then:
If T is a class type, then S must be the same class as T, or a subclass of T.
If T is an interface type, then S must implement interface T.
If S is an interface type, then:
If T is a class type, then T must be Object.
If T is an interface type, then T must be the same interface as S or a superinterface of S.
If S is a class representing the array type SC[], that is, an array of components of type SC, then:
If T is a class type, then T must be Object.
If T is an array type TC[], that is, an array of components of type TC, then one of the following must be true:
TC and SC are the same primitive type.
TC and SC are reference types, and type SC can be cast to TC by recursive application of these rules.
If T is an interface type, T must be one of the interfaces implemented by arrays.
Linking Exceptions :
During resolution of the symbolic reference to the class, array, or interface type, any of the exceptions documented in Section 5.4.3.1 of Java Virtual Machine Specification can be thrown.
Runtime Exceptions :
Otherwise, if objectref cannot be cast to the resolved class, array, or interface type, the checkcast instruction throws a ClassCastException.
Notes :
The checkcast instruction is very similar to the instanceof instruction. It differs in its treatment of null, its behavior when its test fails (checkcast throws an exception, instanceof pushes a result code), and its effect on the operand stack.
Name : instanceof
Opcode : 193(0xc1)
Operation :
Determine if object is of given type
Format :
instanceof
Operand Stack :
..., objectref ..., result
Description :
The objectref, which must be of type reference, is popped from the operand stack. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at the index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved.
If objectref is not null and is an instance of the resolved class or array or implements the resolved interface, the instanceof instruction pushes an int result of 1 as an int on the operand stack. Otherwise, it pushes an int result of 0.
The following rules are used to determine whether an objectref that is not null is an instance of the resolved type: If S is the class of the object referred to by objectref and T is the resolved class, array, or interface type, instanceof determines whether objectref is an instance of T as follows:
If S is an ordinary (nonarray) class, then:
If T is a class type, then S must be the same class as T or a subclass of T.
If T is an interface type, then S must implement interface T.
If S is an interface type, then:
If T is a class type, then T must be Object.
If T is an interface type, then T must be the same interface as S, or a superinterface of S.
If S is a class representing the array type SC[], that is, an array of components of type SC, then:
If T is a class type, then T must be Object.
If T is an array type TC[], that is, an array of components of type TC, then one of the following must be true:
TC and SC are the same primitive type.
TC and SC are reference types, and type SC can be cast to TC by these runtime rules.
If T is an interface type, T must be one of the interfaces implemented by arrays.
Linking Exceptions :
During resolution of symbolic reference to the class, array, or interface type, any of the exceptions documented in Section 5.4.3.1 of Java Virtual Machine Specification can be thrown.
Notes :
The instanceof instruction is very similar to the checkcast instruction. It differs in its treatment of null, its behavior when its test fails (checkcast throws an exception, instanceof pushes a result code), and its effect on the operand stack.
Name : monitorenter
Opcode : 194(0xc2)
Operation :
Enter monitor for object
Format :
monitorenter
Operand Stack :
..., objectref ...
Description :
The objectref must be of type reference.
Each object has a monitor associated with it. The thread that executes monitorenter gains ownership of the monitor associated with objectref. If another thread already owns the monitor associated with objectref, the current thread waits until the object is unlocked, then tries again to gain ownership. If the current thread already owns the monitor associated with objectref, it increments a counter in the monitor indicating the number of times this thread has entered the monitor. If the monitor associated with objectref is not owned by any thread, the current thread becomes the owner of the monitor, setting the entry count of this monitor to 1.
Runtime Exceptions :
If objectref is null, monitorenter throws a NullPointerException.
Notes :
For detailed information about threads and monitors in the Java virtual machine, see Chapter 8 of the Java Virtual Machine Specification, "Threads and Locks."
A monitorenter instruction may be used with one or more monitorexit instructions to implement a synchronized statement in the Java programming language. The monitorenter and monitorexit instructions are not used in the implementation of synchronized methods, although they can be used to provide equivalent locking semantics; however, monitor entry on invocation of a synchronized method is handled implicitly by the Java virtual machines method invocation instructions. See Section 7.14 of Java Virtual Machine Specification for more information on the use of the monitorenter and monitorexit instructions.
The association of a monitor with an object may be managed in various ways that are beyond the scope of this specification. For instance, the monitor may be allocated and deallocated at the same time as the object. Alternatively, it may be dynamically allocated at the time when a thread attempts to gain exclusive access to the object and freed at some later time when no thread remains in the monitor for the object.
The synchronization constructs of the Java programming language require support for operations on monitors besides entry and exit. These include waiting on a monitor (Object.wait) and notifying other threads waiting on a monitor (Object.notifyAll and Object.notify). These operations are supported in the standard package java.lang supplied with the Java virtual machine. No explicit support for these operations appears in the instruction set of the Java virtual machine.
Name : monitorexit
Opcode : 195(0xc3)
Operation :
Exit monitor for object
Format :
monitorexit
Operand Stack :
..., objectref ...
Description :
The objectref must be of type reference.
The current thread should be the owner of the monitor associated with the instance referenced by objectref. The thread decrements the counter indicating the number of times it has entered this monitor. If as a result the value of the counter becomes zero, the current thread releases the monitor. If the monitor associated with objectref becomes free, other threads that are waiting to acquire that monitor are allowed to attempt to do so.
Runtime Exceptions :
If objectref is null, monitorexit throws a NullPointerException.
Otherwise, if the current thread is not the owner of the monitor, monitorexit throws an IllegalMonitorStateException.
Otherwise, if the virtual machine implementation enforces the rules on structured use of locks described in Section 8.13 of Java Virtual Machine Specification and if the second of those rules is violated by the execution of this monitorexit instruction, then monitorexit throws an IllegalMonitorStateException.
Name : wide
Opcode : 196(0xc4)
Operation :
Extend local variable index by additional bytes
Format :
Format 1
wide
indexbyte1
indexbyte2
where is one of iload, fload, aload, lload, dload, istore, fstore, astore, lstore, dstore, or ret
Format 2
wide
iinc
indexbyte1
indexbyte2
constbyte1
constbyte2
Operand Stack :
Same as modified instruction
Description :
The wide instruction modifies the behavior of another instruction. It takes one of two formats, depending on the instruction being modified. The first form of the wide instruction modifies one of the instructions iload, fload, aload, lload, dload, istore, fstore, astore, lstore, dstore, or ret. The second form applies only to the iinc instruction.
In either case, the wide opcode itself is followed in the compiled code by the opcode of the instruction wide modifies. In either form, two unsigned bytes indexbyte1 and indexbyte2 follow the modified opcode and are assembled into a 16-bit unsigned index to a local variable in the current frame, where the value of the index is
(indexbyte1 << 8) | indexbyte2. The calculated index must be an index into the local variable array of the current frame. Where the wide instruction modifies an lload, dload, lstore, or dstore instruction, the index following the calculated index (index + 1) must also be an index into the local variable array. In the second form, two immediate unsigned bytes constbyte1 and constbyte2 follow indexbyte1 and indexbyte2 in the code stream. Those bytes are also assembled into a signed 16-bit constant, where the constant is (constbyte1 << 8) | constbyte2.
The widened bytecode operates as normal, except for the use of the wider index and, in the case of the second form, the larger increment range.
Notes :
Although we say that wide "modifies the behavior of another instruction," the wide instruction effectively treats the bytes constituting the modified instruction as operands, denaturing the embedded instruction in the process. In the case of a modified iinc instruction, one of the logical operands of the iinc is not even at the normal offset from the opcode. The embedded instruction must never be executed directly; its opcode must never be the target of any control transfer instruction.
Name : multianewarray
Opcode : 197(0xc5)
Operation :
Create new multidimensional array
Format :
multianewarray
Operand Stack :
..., count1, [count2, ...] ..., arrayref
Description :
The dimensions operand is an unsigned byte that must be greater than or equal to 1. It represents the number of dimensions of the array to be created. The operand stack must contain dimensions values. Each such value represents the number of components in a dimension of the array to be created, must be of type int, and must be nonnegative. The count1 is the desired length in the first dimension, count2 in the second, etc.
All of the count values are popped off the operand stack. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant pool item at the index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved. The resulting entry must be an array class type of dimensionality greater than or equal to dimensions.
A new multidimensional array of the array type is allocated from the garbage-collected heap. If any count value is zero, no subsequent dimensions are allocated. The components of the array in the first dimension are initialized to subarrays of the type of the second dimension, and so on. The components of the last allocated dimension of the array are initialized to the default initial value for the type of the components. A reference arrayref to the new array is pushed onto the operand stack.
Linking Exceptions :
During resolution of the symbolic reference to the class, array, or interface type, any of the exceptions documented in Section 5.4.3.1 of Java Virtual Machine Specification can be thrown.
Otherwise, if the current class does not have permission to access the element type of the resolved array class, multianewarray throws an IllegalAccessError.
Runtime Exceptions :
Otherwise, if any of the dimensions values on the operand stack are less than zero, the multianewarray instruction throws a NegativeArraySizeException.
Notes :
It may be more efficient to use newarray or anewarray when creating an array of a single dimension.
The array class referenced via the runtime constant pool may have more dimensions than the dimensions operand of the multianewarray instruction. In that case, only the first dimensions of the dimensions of the array are created.
Name : ifnull
Opcode : 198(0xc6)
Operation :
Branch if reference is null
Format :
ifnull
Operand Stack :
..., value ...
Description :
The value must of type reference. It is popped from the operand stack. If value is null, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifnull instruction. The target address must be that of an opcode of an instruction within the method that contains this ifnull instruction.
Otherwise, execution proceeds at the address of the instruction following this ifnull instruction.
Name : ifnonnull
Opcode : 199(0xc7)
Operation :
Branch if reference not null
Format :
ifnonnull
Operand Stack :
..., value ...
Description :
The value must be of type reference. It is popped from the operand stack. If value is not null, the unsigned branchbyte1 and branchbyte2 are used to construct a signed 16-bit offset, where the offset is calculated to be (branchbyte1 << 8) | branchbyte2. Execution then proceeds at that offset from the address of the opcode of this ifnonnull instruction. The target address must be that of an opcode of an instruction within the method that contains this ifnonnull instruction.
Otherwise, execution proceeds at the address of the instruction following this ifnonnull instruction.
Name : goto_w
Opcode : 200(0xc8)
Operation :
Branch always (wide index)
Format :
goto_w
Operand Stack :
No change
Description :
The unsigned bytes branchbyte1, branchbyte2, branchbyte3, and branchbyte4 are used to construct a signed 32-bit branchoffset, where branchoffset is (branchbyte1 << 24) | (branchbyte2 << 16) | (branchbyte3 << 8) | branchbyte4. Execution proceeds at that offset from the address of the opcode of this goto_w instruction. The target address must be that of an opcode of an instruction within the method that contains this goto_w instruction.
Notes :
Although the goto_w instruction takes a 4-byte branch offset, other factors limit the size of a method to 65535 bytes. This limit may be raised in a future release of the Java virtual machine.
Name : jsr_w
Opcode : 201(0xc9)
Operation :
Jump subroutine (wide index)
Format :
jsr_w
Operand Stack :
... ..., address
Description :
The address of the opcode of the instruction immediately following this jsr_w instruction is pushed onto the operand stack as a value of type returnAddress. The unsigned branchbyte1, branchbyte2, branchbyte3, and branchbyte4 are used to construct a signed 32-bit offset, where the offset is (branchbyte1 << 24) | (branchbyte2 << 16) | (branchbyte3 << 8) | branchbyte4. Execution proceeds at that offset from the address of this jsr_w instruction. The target address must be that of an opcode of an instruction within the method that contains this jsr_w instruction.
Notes :
The jsr_w instruction is used with the ret instruction in the implementation of the finally clauses of the Java programming language. Note that jsr_w pushes the address onto the operand stack and ret gets it out of a local variable. This asymmetry is intentional.
Although the jsr_w instruction takes a 4-byte branch offset, other factors limit the size of a method to 65535 bytes. This limit may be raised in a future release of the Java virtual machine.
相关推荐
标题中的“Java和Python编程实现的不同使用macro action.zip”表明这是一个关于使用Java和Python两种编程语言实现特定功能的项目,可能涉及到宏操作(macro action)的实现。在课程设计或项目开发中,选择不同的编程...
[confluence插件] confluence-markdown-macro-1.6.22.jar [confluence插件] confluence-markdown-macro-1.6.22.jar [confluence插件] confluence-markdown-macro-1.6.22.jar [confluence插件] confluence-markdown-...
标签:typelevel、macro、compat、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译,请...
标签:typelevel、macro、compat、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译...
JPP是Java的简单宏预处理程序。 它完全用Java编写,并提供类似C的预处理器命令,例如#define #undef #ifdef #ifndef #else #endif #include。 还有待开发。
Java Macro Preprocessor (jmp) 是一个开源项目,旨在为Java开发者提供类似C/C++预处理器的功能,尽管目前它还没有实现宏定义。这个工具的核心目的是在Java源代码编译之前进行预处理,允许开发者进行条件编译、文本...
好用 的 excel macro,可以build好用 的 excel macro,可以build好用 的 excel macro,可以build好用 的 excel macro,可以build
标题 "cortexm3_macro" 指向的是与Cortex-M3处理器相关的宏定义,这通常涉及到微控制器编程,特别是使用ARM公司的Cortex-M3内核的微控制器。Cortex-M3是一款高效的32位RISC(精简指令集计算机)处理器核心,广泛应用...
FreeMarker使用Macro实例,很好的学习资料。
根据给定文件的信息,我们可以总结出以下关于新代数控系统OpenCNC MACRO手册的关键知识点: ### 一、概述 新代数控系统OpenCNC MACRO手册是针对SYNTEC OpenCNC MACRO开发工具的操作手册。该手册旨在帮助用户理解和...
SAS宏设施是SAS系统中的一个功能,它允许程序员使用宏变量(Macro Variables)、宏程序(Macro Programs)和宏语言(Macro Language)来编写可重用的代码,这些代码可以自动执行复杂的SAS程序任务。SAS宏设施的主要...
QuickMacro 8是一款高效实用的自动化工具,被誉为“按键精灵”的免费版本。它专为用户提供了便捷的表单操作和宏录制功能,极大地提升了工作效率,尤其适用于那些需要频繁重复相同键盘和鼠标操作的工作场景。 首先,...
confluence-markdown-macro-1.6.25
Pulover Macro Creator 中文版是基于 AutoHotkey 的轻量级应用程序,可为您提供实用的自动化工具和脚本生成器。它显示了一个全面的界面,可让您记录鼠标的移动,键盘手势,管理窗口,文件,控件以及创建 If/Else ...
设有10个学生的成绩分别是76,69,84,90,73,88,89,63,100,80分,试编制一个子程序统计60~69分,70~79分,80~89分,90~99分及100分的人数,放在S6,S7,S8,S9和S10单元中
Macro工具(或图标或快捷键)制作完成,建议将自己习惯的一些操作作成自定义工具,以提高工作效率。但是请注意,设置快捷键时,不要和默认的快捷键干涉,也不要去修改默认的快捷键。这样有利于其他同事使用该电脑。 ...
Blade Macro是Blade模板引擎的一个特色功能,允许我们自定义可重用的模板代码块,以提高代码的复用性和可维护性。现在,让我们深入探讨一下Blade Macro的原理、用法以及它如何帮助优化 Laravel 开发流程。 首先,...
在IT领域,宏(Macro)是一种自动化工具,尤其在Microsoft Office应用程序如Word、Excel和PowerPoint中广泛使用。宏允许用户记录和执行一系列操作,以提高工作效率。然而,宏有时可能会引发问题,尤其是在不安全的...
"tiny macro os源码工程" 是一个专门为单片机和嵌入式系统设计的轻量级实时操作系统(RTOS)。在单片机和嵌入式领域,由于资源限制,往往需要非常小巧、高效的系统来实现多任务管理。tiny macro os正是这样一个解决...
SAS/MACRO是SAS系统中的一个强大工具,它允许用户通过自定义宏语言来创建可重用的代码块,提高编程效率和代码的可维护性。MACRO语言不仅用于简单的数据处理,还能实现复杂的统计分析流程的自动化,使得在大数据环境...