import {AssemblyInstructionInfo} from '../base'; export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined { if (!opcode) return; switch (opcode.toUpperCase()) { case 'AALOAD': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.aaload`, html: `
Instruction aaload: Load reference from array
Format: aaload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction aastore: Store into reference array
Format: aastore
Operand Stack: ..., arrayref, index, value → ...
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.
Instruction aconst_null: Push null
Format: aconst_null
Operand Stack: ... → ..., null
Push the null
object reference
onto the operand stack.
Instruction aload: Load reference from local variable
Format: aload index
Operand Stack: ... → ..., objectref
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). The local variable at index must contain a reference
. The objectref in the local variable at index is pushed onto the operand stack.
Instruction aload_0: Load reference from local variable
Format: aload_[n]
Operand Stack: ... → ..., objectref
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a reference
. The objectref in the local variable at <n> is pushed onto the operand stack.
Instruction aload_1: Load reference from local variable
Format: aload_[n]
Operand Stack: ... → ..., objectref
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a reference
. The objectref in the local variable at <n> is pushed onto the operand stack.
Instruction aload_2: Load reference from local variable
Format: aload_[n]
Operand Stack: ... → ..., objectref
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a reference
. The objectref in the local variable at <n> is pushed onto the operand stack.
Instruction aload_3: Load reference from local variable
Format: aload_[n]
Operand Stack: ... → ..., objectref
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a reference
. The objectref in the local variable at <n> is pushed onto the operand stack.
Instruction anewarray: Create new array of reference
Format: anewarray indexbyte1 indexbyte2
Operand Stack: ..., count → ..., arrayref
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 run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a class, array, or interface type. The named class, array, or interface type is resolved (§5.4.3.1). 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 (§2.4).
Instruction areturn: Return reference from method
Format: areturn
Operand Stack: ..., objectref → [empty]
The objectref must be of type reference
and must refer to an object of a type that is assignment compatible (JLS §5.2) with the type represented by the return descriptor (§4.3.3) of the current method. If the current method is a synchronized
method, the monitor entered or reentered on invocation of the method is updated and possibly exited as if by execution of a monitorexit instruction (§monitorexit) in the current thread. If no exception is thrown, objectref is popped from the operand stack of the current frame (§2.6) 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.
Instruction arraylength: Get length of array
Format: arraylength
Operand Stack: ..., arrayref → ..., length
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
.
Instruction astore: Store reference into local variable
Format: astore index
Operand Stack: ..., objectref → ...
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). 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.
Instruction astore_0: Store reference into local variable
Format: astore_[n]
Operand Stack: ..., objectref → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to objectref.
Instruction astore_1: Store reference into local variable
Format: astore_[n]
Operand Stack: ..., objectref → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to objectref.
Instruction astore_2: Store reference into local variable
Format: astore_[n]
Operand Stack: ..., objectref → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to objectref.
Instruction astore_3: Store reference into local variable
Format: astore_[n]
Operand Stack: ..., objectref → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to objectref.
Instruction athrow: Throw exception or error
Format: athrow
Operand Stack: ..., objectref → objectref
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 (§2.6) for the first exception handler that matches the class of objectref, as given by the algorithm in §2.10.
Instruction baload: Load byte or boolean from array
Format: baload
Operand Stack: ..., arrayref, index → ..., value
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. The byte
value in the component of the array at index is retrieved, sign-extended to an int
value, and pushed onto the top of the operand stack.
Instruction bastore: Store into byte or boolean array
Format: bastore
Operand Stack: ..., arrayref, index, value → ...
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.
Instruction bipush: Push byte
Format: bipush byte
Operand Stack: ... → ..., value
The immediate byte is sign-extended to an int
value. That value is pushed onto the operand stack.
Instruction caload: Load char from array
Format: caload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction castore: Store into char array
Format: castore
Operand Stack: ..., arrayref, index, value → ...
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.
Instruction checkcast: Check whether object is of given type
Format: checkcast indexbyte1 indexbyte2
Operand Stack: ..., objectref → ..., objectref
The objectref must be of type reference
. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a class, array, or interface type.
Instruction d2f: Convert double to float
Format: d2f
Operand Stack: ..., value → ..., result
The value on the top of the operand stack must be of type double
. It is popped from the operand stack and converted to a float
result using the round to nearest rounding policy (§2.8). The result is pushed onto the operand stack.
Instruction d2i: Convert double to int
Format: d2i
Operand Stack: ..., value → ..., result
The value on the top of the operand stack must be of type double
. It is popped from the operand stack and converted to an int
result. The result is pushed onto the operand stack:
Instruction d2l: Convert double to long
Format: d2l
Operand Stack: ..., value → ..., result
The value on the top of the operand stack must be of type double
. It is popped from the operand stack and converted to a long
. The result is pushed onto the operand stack:
Instruction dadd: Add double
Format: dadd
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack. The double
result is value1 + value2. The result is pushed onto the operand stack.
Instruction daload: Load double from array
Format: daload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction dastore: Store into double array
Format: dastore
Operand Stack: ..., arrayref, index, value → ...
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 is stored as the component of the array indexed by index.
Instruction dcmpg: Compare double
Format: dcmp[op]
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack and a floating-point comparison is performed:
Instruction dcmpl: Compare double
Format: dcmp[op]
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack and a floating-point comparison is performed:
Instruction dconst_0: Push double
Format: dconst_[d]
Operand Stack: ... → ..., <d>
Push the double
constant <d> (0.0 or 1.0) onto the operand stack.
Instruction dconst_1: Push double
Format: dconst_[d]
Operand Stack: ... → ..., <d>
Push the double
constant <d> (0.0 or 1.0) onto the operand stack.
Instruction ddiv: Divide double
Format: ddiv
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack. The double
result is value1 / value2. The result is pushed onto the operand stack.
Instruction dload: Load double from local variable
Format: dload index
Operand Stack: ... → ..., value
The index is an unsigned byte. Both index and index+1 must be indices into the local variable array of the current frame (§2.6). The local variable at index must contain a double
. The value of the local variable at index is pushed onto the operand stack.
Instruction dload_0: Load double from local variable
Format: dload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a double
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction dload_1: Load double from local variable
Format: dload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a double
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction dload_2: Load double from local variable
Format: dload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a double
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction dload_3: Load double from local variable
Format: dload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a double
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction dmul: Multiply double
Format: dmul
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack. The double
result is value1 * value2. The result is pushed onto the operand stack.
Instruction dneg: Negate double
Format: dneg
Operand Stack: ..., value → ..., result
The value must be of type double
. It is popped from the operand stack. The double
result is the arithmetic negation of value. The result is pushed onto the operand stack.
Instruction drem: Remainder double
Format: drem
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack. The double
result is calculated and pushed onto the operand stack.
Instruction dreturn: Return double from method
Format: dreturn
Operand Stack: ..., value → [empty]
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 entered or reentered on invocation of the method is updated and possibly exited as if by execution of a monitorexit instruction (§monitorexit) in the current thread. If no exception is thrown, value is popped from the operand stack of the current frame (§2.6) 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.
Instruction dstore: Store double into local variable
Format: dstore index
Operand Stack: ..., value → ...
The index is an unsigned byte. Both index and index+1 must be indices into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type double
. It is popped from the operand stack. The local variables at index and index+1 are set to value.
Instruction dstore_0: Store double into local variable
Format: dstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type double
. It is popped from the operand stack. The local variables at <n> and <n>+1 are set to value.
Instruction dstore_1: Store double into local variable
Format: dstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type double
. It is popped from the operand stack. The local variables at <n> and <n>+1 are set to value.
Instruction dstore_2: Store double into local variable
Format: dstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type double
. It is popped from the operand stack. The local variables at <n> and <n>+1 are set to value.
Instruction dstore_3: Store double into local variable
Format: dstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type double
. It is popped from the operand stack. The local variables at <n> and <n>+1 are set to value.
Instruction dsub: Subtract double
Format: dsub
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type double
. The values are popped from the operand stack. The double
result is value1 - value2. The result is pushed onto the operand stack.
Instruction dup: Duplicate the top operand stack value
Format: dup
Operand Stack: ..., value → ..., value, value
Duplicate the top value on the operand stack and push the duplicated value onto the operand stack.
`, tooltip: `Duplicate the top operand stack value`, }; case 'DUP_X1': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.dup_x1`, html: `Instruction dup_x1: Duplicate the top operand stack value and insert two values down
Format: dup_x1
Operand Stack: ..., value2, value1 → ..., value1, value2, value1
Duplicate the top value on the operand stack and insert the duplicated value two values down in the operand stack.
`, tooltip: `Duplicate the top operand stack value and insert two values down`, }; case 'DUP_X2': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.dup_x2`, html: `Instruction dup_x2: Duplicate the top operand stack value and insert two or three values down
Format: dup_x2
Operand Stack: Form 1: ..., value3, value2, value1 →
Duplicate the top value on the operand stack and insert the duplicated value two or three values down in the operand stack.
`, tooltip: `Duplicate the top operand stack value and insert two or three values down`, }; case 'DUP2': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.dup2`, html: `Instruction dup2: Duplicate the top one or two operand stack values
Format: dup2
Operand Stack: Form 1: ..., value2, value1 →
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.
`, tooltip: `Duplicate the top one or two operand stack values`, }; case 'DUP2_X1': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.dup2_x1`, html: `Instruction dup2_x1: 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 →
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.
`, tooltip: `Duplicate the top one or two operand stack values and insert two or three values down`, }; case 'DUP2_X2': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.dup2_x2`, html: `Instruction dup2_x2: 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 →
Duplicate the top one or two values on the operand stack and insert the duplicated values, in the original order, into the operand stack.
`, tooltip: `Duplicate the top one or two operand stack values and insert two, three, or four values down`, }; case 'F2D': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.f2d`, html: `Instruction f2d: Convert float to double
Format: f2d
Operand Stack: ..., value → ..., result
The value on the top of the operand stack must be of type float
. It is popped from the operand stack and converted to a double
result. The result is pushed onto the operand stack.
Instruction f2i: Convert float to int
Format: f2i
Operand Stack: ..., value → ..., result
The value on the top of the operand stack must be of type float
. It is popped from the operand stack and converted to an int
result. The result is pushed onto the operand stack:
Instruction f2l: Convert float to long
Format: f2l
Operand Stack: ..., value → ..., result
The value on the top of the operand stack must be of type float
. It is popped from the operand stack and converted to a long
result. The result is pushed onto the operand stack:
Instruction fadd: Add float
Format: fadd
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack. The float
result is value1 + value2. The result is pushed onto the operand stack.
Instruction faload: Load float from array
Format: faload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction fastore: Store into float array
Format: fastore
Operand Stack: ..., arrayref, index, value → ...
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 is stored as the component of the array indexed by index.
Instruction fcmpg: Compare float
Format: fcmp[op]
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack and a floating-point comparison is performed:
Instruction fcmpl: Compare float
Format: fcmp[op]
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack and a floating-point comparison is performed:
Instruction fconst_0, 1: Push float
Format: fconst_[f]
Operand Stack: ... → ..., <f>
Push the float
constant <f> (0.0, 1.0, or 2.0) onto the operand stack.
Instruction fconst_2: Push float
Format: fconst_[f]
Operand Stack: ... → ..., <f>
Push the float
constant <f> (0.0, 1.0, or 2.0) onto the operand stack.
Instruction fdiv: Divide float
Format: fdiv
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack. The float
result is value1 / value2. The result is pushed onto the operand stack.
Instruction fload: Load float from local variable
Format: fload index
Operand Stack: ... → ..., value
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). The local variable at index must contain a float
. The value of the local variable at index is pushed onto the operand stack.
Instruction fload_0: Load float from local variable
Format: fload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a float
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction fload_1: Load float from local variable
Format: fload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a float
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction fload_2: Load float from local variable
Format: fload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a float
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction fload_3: Load float from local variable
Format: fload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain a float
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction fmul: Multiply float
Format: fmul
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack. The float
result is value1 * value2. The result is pushed onto the operand stack.
Instruction fneg: Negate float
Format: fneg
Operand Stack: ..., value → ..., result
The value must be of type float
. It is popped from the operand stack. The float
result is the arithmetic negation of value. The result is pushed onto the operand stack.
Instruction frem: Remainder float
Format: frem
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack. The float
result is calculated and pushed onto the operand stack.
Instruction freturn: Return float from method
Format: freturn
Operand Stack: ..., value → [empty]
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 entered or reentered on invocation of the method is updated and possibly exited as if by execution of a monitorexit instruction (§monitorexit) in the current thread. If no exception is thrown, value is popped from the operand stack of the current frame (§2.6) 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.
Instruction fstore: Store float into local variable
Format: fstore index
Operand Stack: ..., value → ...
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type float
. It is popped from the operand stack, and the value of the local variable at index is set to value.
Instruction fstore_0: Store float into local variable
Format: fstore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type float
. It is popped from the operand stack, and the value of the local variable at <n> is set to value.
Instruction fstore_1: Store float into local variable
Format: fstore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type float
. It is popped from the operand stack, and the value of the local variable at <n> is set to value.
Instruction fstore_2: Store float into local variable
Format: fstore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type float
. It is popped from the operand stack, and the value of the local variable at <n> is set to value.
Instruction fstore_3: Store float into local variable
Format: fstore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). The value on the top of the operand stack must be of type float
. It is popped from the operand stack, and the value of the local variable at <n> is set to value.
Instruction fsub: Subtract float
Format: fsub
Operand Stack: ..., value1, value2 → ..., result
Both value1 and value2 must be of type float
. The values are popped from the operand stack. The float
result is value1 - value2. The result is pushed onto the operand stack.
Instruction getfield: Fetch field from object
Format: getfield indexbyte1 indexbyte2
Operand Stack: ..., objectref → ..., value
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a field (§5.1), 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 (§5.4.3.2).
Instruction getstatic: Get static field from class
Format: getstatic indexbyte1 indexbyte2
Operand Stack: ..., → ..., value
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a field (§5.1), 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 (§5.4.3.2).
Instruction goto: Branch always
Format: goto branchbyte1 branchbyte2
Operand Stack: No change undefined
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.
Instruction goto_w: Branch always (wide index)
Format: goto_w branchbyte1 branchbyte2 branchbyte3 branchbyte4
Operand Stack: No change undefined
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.
Instruction i2b: Convert int to byte
Format: i2b
Operand Stack: ..., value → ..., result
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. The result is pushed onto the operand stack.
Instruction i2c: Convert int to char
Format: i2c
Operand Stack: ..., value → ..., result
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. The result is pushed onto the operand stack.
Instruction i2d: Convert int to double
Format: i2d
Operand Stack: ..., value → ..., result
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.
Instruction i2f: Convert int to float
Format: i2f
Operand Stack: ..., value → ..., result
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 float
result using the round to nearest rounding policy (§2.8). The result is pushed onto the operand stack.
Instruction i2l: Convert int to long
Format: i2l
Operand Stack: ..., value → ..., result
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. The result is pushed onto the operand stack.
Instruction i2s: Convert int to short
Format: i2s
Operand Stack: ..., value → ..., result
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. The result is pushed onto the operand stack.
Instruction iadd: Add int
Format: iadd
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction iaload: Load int from array
Format: iaload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction iand: Boolean AND int
Format: iand
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction iastore: Store into int array
Format: iastore
Operand Stack: ..., arrayref, index, value → ...
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.
Instruction iconst_m1: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction iconst_0: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction iconst_1: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction iconst_2: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction iconst_3: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction iconst_4: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction iconst_5: Push int constant
Format: iconst_[i]
Operand Stack: ... → ..., <i>
Push the int
constant <i> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.
Instruction idiv: Divide int
Format: idiv
Operand Stack: ..., value1, value2 → ..., result
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 (JLS §15.17.2). The result is pushed onto the operand stack.
Instruction if_acmpeq: Branch if reference comparison succeeds
Format: if_acmp[cond] branchbyte1 branchbyte2
Operand Stack: ..., value1, value2 → ...
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:
Instruction if_acmpne: Branch if reference comparison succeeds
Format: if_acmp[cond] branchbyte1 branchbyte2
Operand Stack: ..., value1, value2 → ...
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:
Instruction if_icmpeq: Branch if int comparison succeeds
Format: if_icmp[cond] branchbyte1 branchbyte2
Operand Stack: ..., value1, value2 → ...
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:
Instruction if_icmpne: Branch if int comparison succeeds
Format: if_icmp[cond] branchbyte1 branchbyte2
Operand Stack: ..., value1, value2 → ...
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:
Instruction ifeq: Branch if int comparison with zero succeeds
Format: if[cond] branchbyte1 branchbyte2
Operand Stack: ..., value → ...
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:
Instruction ifne: Branch if int comparison with zero succeeds
Format: if[cond] branchbyte1 branchbyte2
Operand Stack: ..., value → ...
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:
Instruction ifnonnull: Branch if reference not null
Format: ifnonnull branchbyte1 branchbyte2
Operand Stack: ..., value → ...
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.
Instruction ifnull: Branch if reference is null
Format: ifnull branchbyte1 branchbyte2
Operand Stack: ..., value → ...
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.
Instruction iinc: Increment local variable by constant
Format: iinc index const
Operand Stack: No change undefined
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). 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.
Instruction iload: Load int from local variable
Format: iload index
Operand Stack: ... → ..., value
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). The local variable at index must contain an int
. The value of the local variable at index is pushed onto the operand stack.
Instruction iload_0: Load int from local variable
Format: iload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain an int
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction iload_1: Load int from local variable
Format: iload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain an int
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction iload_2: Load int from local variable
Format: iload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain an int
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction iload_3: Load int from local variable
Format: iload_[n]
Operand Stack: ... → ..., value
The <n> must be an index into the local variable array of the current frame (§2.6). The local variable at <n> must contain an int
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction imul: Multiply int
Format: imul
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction ineg: Negate int
Format: ineg
Operand Stack: ..., value → ..., result
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.
Instruction instanceof: Determine if object is of given type
Format: instanceof indexbyte1 indexbyte2
Operand Stack: ..., objectref → ..., result
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 run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a class, array, or interface type.
Instruction invokedynamic: Invoke a dynamically-computed call site
Format: invokedynamic indexbyte1 indexbyte2 0 0
Operand Stack: ..., [arg1, [arg2 ...]] → ...
First, the unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a dynamically-computed call site (§5.1). The values of the third and fourth operand bytes must always be zero.
Instruction invokeinterface: Invoke interface method
Format: invokeinterface indexbyte1 indexbyte2 count 0
Operand Stack: ..., objectref, [arg1, [arg2 ...]] → ...
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to an interface method (§5.1), which gives the name and descriptor (§4.3.3) 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 (§5.4.3.4).
Instruction invokespecial: Invoke instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes
Format: invokespecial indexbyte1 indexbyte2
Operand Stack: ..., objectref, [arg1, [arg2 ...]] → ...
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a method or an interface method (§5.1), which gives the name and descriptor (§4.3.3) of the method or interface method as well as a symbolic reference to the class or interface in which the method or interface method is to be found. The named method is resolved (§5.4.3.3, §5.4.3.4).
Instruction invokestatic: Invoke a class (static) method
Format: invokestatic indexbyte1 indexbyte2
Operand Stack: ..., [arg1, [arg2 ...]] → ...
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a method or an interface method (§5.1), which gives the name and descriptor (§4.3.3) of the method or interface method as well as a symbolic reference to the class or interface in which the method or interface method is to be found. The named method is resolved (§5.4.3.3, §5.4.3.4).
Instruction invokevirtual: Invoke instance method; dispatch based on class
Format: invokevirtual indexbyte1 indexbyte2
Operand Stack: ..., objectref, [arg1, [arg2 ...]] → ...
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a method (§5.1), which gives the name and descriptor (§4.3.3) 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 (§5.4.3.3).
Instruction ior: Boolean OR int
Format: ior
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction irem: Remainder int
Format: irem
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction ireturn: Return int from method
Format: ireturn
Operand Stack: ..., value → [empty]
The current method must have return type boolean
, byte
, char
, short
, or int
. The value must be of type int
. If the current method is a synchronized
method, the monitor entered or reentered on invocation of the method is updated and possibly exited as if by execution of a monitorexit instruction (§monitorexit) in the current thread. If no exception is thrown, value is popped from the operand stack of the current frame (§2.6) 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.
Instruction ishl: Shift left int
Format: ishl
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction ishr: Arithmetic shift right int
Format: ishr
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction istore: Store int into local variable
Format: istore index
Operand Stack: ..., value → ...
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). 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.
Instruction istore_0: Store int into local variable
Format: istore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to value.
Instruction istore_1: Store int into local variable
Format: istore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to value.
Instruction istore_2: Store int into local variable
Format: istore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to value.
Instruction istore_3: Store int into local variable
Format: istore_[n]
Operand Stack: ..., value → ...
The <n> must be an index into the local variable array of the current frame (§2.6). 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 <n> is set to value.
Instruction isub: Subtract int
Format: isub
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction iushr: Logical shift right int
Format: iushr
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction ixor: Boolean XOR int
Format: ixor
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction jsr: Jump subroutine
Format: jsr branchbyte1 branchbyte2
Operand Stack: ... → ..., address
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.
Instruction jsr_w: Jump subroutine (wide index)
Format: jsr_w branchbyte1 branchbyte2 branchbyte3 branchbyte4
Operand Stack: ... → ..., address
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.
Instruction l2d: Convert long to double
Format: l2d
Operand Stack: ..., value → ..., result
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 the round to nearest rounding policy (§2.8). The result is pushed onto the operand stack.
Instruction l2f: Convert long to float
Format: l2f
Operand Stack: ..., value → ..., result
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 the round to nearest rounding policy (§2.8). The result is pushed onto the operand stack.
Instruction l2i: Convert long to int
Format: l2i
Operand Stack: ..., value → ..., result
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.
Instruction ladd: Add long
Format: ladd
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction laload: Load long from array
Format: laload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction land: Boolean AND long
Format: land
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lastore: Store into long array
Format: lastore
Operand Stack: ..., arrayref, index, value → ...
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.
Instruction lcmp: Compare long
Format: lcmp
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lconst_0: Push long constant
Format: lconst_[l]
Operand Stack: ... → ..., <l>
Push the long
constant <l> (0 or 1) onto the operand stack.
Instruction lconst_1: Push long constant
Format: lconst_[l]
Operand Stack: ... → ..., <l>
Push the long
constant <l> (0 or 1) onto the operand stack.
Instruction ldc: Push item from run-time constant pool
Format: ldc index
Operand Stack: ... → ..., value
The index is an unsigned byte that must be a valid index into the run-time constant pool of the current class (§2.5.5). The run-time constant pool entry at index must be loadable (§5.1), and not any of the following:
`, tooltip: `Push item from run-time constant pool`, }; case 'LDC_W': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.ldc_w`, html: `Instruction ldc_w: Push item from run-time constant pool (wide index)
Format: ldc_w indexbyte1 indexbyte2
Operand Stack: ... → ..., value
The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index into the run-time constant pool of the current class (§2.5.5), where the value of the index is calculated as (indexbyte1 <<
8) | indexbyte2. The index must be a valid index into the run-time constant pool of the current class. The run-time constant pool entry at the index must be loadable (§5.1), and not any of the following:
Instruction ldc2_w: Push long or double from run-time constant pool (wide index)
Format: ldc2_w indexbyte1 indexbyte2
Operand Stack: ... → ..., value
The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index into the run-time constant pool of the current class (§2.5.5), where the value of the index is calculated as (indexbyte1 <<
8) | indexbyte2. The index must be a valid index into the run-time constant pool of the current class. The run-time constant pool entry at the index must be loadable (§5.1), and in particular one of the following:
Instruction ldiv: Divide long
Format: ldiv
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lload: Load long from local variable
Format: lload index
Operand Stack: ... → ..., value
The index is an unsigned byte. Both index and index+1 must be indices into the local variable array of the current frame (§2.6). The local variable at index must contain a long
. The value of the local variable at index is pushed onto the operand stack.
Instruction lload_0: Load long from local variable
Format: lload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a long
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction lload_1: Load long from local variable
Format: lload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a long
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction lload_2: Load long from local variable
Format: lload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a long
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction lload_3: Load long from local variable
Format: lload_[n]
Operand Stack: ... → ..., value
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). The local variable at <n> must contain a long
. The value of the local variable at <n> is pushed onto the operand stack.
Instruction lmul: Multiply long
Format: lmul
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lneg: Negate long
Format: lneg
Operand Stack: ..., value → ..., result
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.
Instruction lookupswitch: Access jump table by key match and jump
Format: lookupswitch <0-3 byte pad> defaultbyte1 defaultbyte2 defaultbyte3 defaultbyte4 npairs1 npairs2 npairs3 npairs4 match-offset pairs...
Operand Stack: ..., key → ...
A lookupswitch is a variable-length instruction. Immediately after the lookupswitch opcode, between zero and three bytes must act as padding, such that 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.
Instruction lor: Boolean OR long
Format: lor
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lrem: Remainder long
Format: lrem
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lreturn: Return long from method
Format: lreturn
Operand Stack: ..., value → [empty]
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 entered or reentered on invocation of the method is updated and possibly exited as if by execution of a monitorexit instruction (§monitorexit) in the current thread. If no exception is thrown, value is popped from the operand stack of the current frame (§2.6) 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.
Instruction lshl: Shift left long
Format: lshl
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lshr: Arithmetic shift right long
Format: lshr
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lstore: Store long into local variable
Format: lstore index
Operand Stack: ..., value → ...
The index is an unsigned byte. Both index and index+1 must be indices into the local variable array of the current frame (§2.6). 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.
Instruction lstore_0: Store long into local variable
Format: lstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). 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 <n> and <n>+1 are set to value.
Instruction lstore_1: Store long into local variable
Format: lstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). 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 <n> and <n>+1 are set to value.
Instruction lstore_2: Store long into local variable
Format: lstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). 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 <n> and <n>+1 are set to value.
Instruction lstore_3: Store long into local variable
Format: lstore_[n]
Operand Stack: ..., value → ...
Both <n> and <n>+1 must be indices into the local variable array of the current frame (§2.6). 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 <n> and <n>+1 are set to value.
Instruction lsub: Subtract long
Format: lsub
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction lushr: Logical shift right long
Format: lushr
Operand Stack: ..., value1, value2 → ..., result
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 by s bit positions, with zero extension, where s is the value of the low 6 bits of value2. The result is pushed onto the operand stack.
Instruction lxor: Boolean XOR long
Format: lxor
Operand Stack: ..., value1, value2 → ..., result
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.
Instruction monitorenter: Enter monitor for object
Format: monitorenter
Operand Stack: ..., objectref → ...
The objectref must be of type reference
.
Instruction monitorexit: Exit monitor for object
Format: monitorexit
Operand Stack: ..., objectref → ...
The objectref must be of type reference
.
Instruction multianewarray: Create new multidimensional array
Format: multianewarray indexbyte1 indexbyte2 dimensions
Operand Stack: ..., count1, [count2, ...] → ..., arrayref
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 non-negative. The count1 is the desired length in the first dimension, count2 in the second, etc.
Instruction new: Create new object
Format: new indexbyte1 indexbyte2
Operand Stack: ... → ..., objectref
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a class or interface type. The named class or interface type is resolved (§5.4.3.1) and should result in a class 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 (§2.3, §2.4). The objectref, a reference
to the instance, is pushed onto the operand stack.
Instruction newarray: Create new array
Format: newarray atype
Operand Stack: ..., count → ..., arrayref
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.
Instruction nop: Do nothing
Format: nop
Operand Stack: No change undefined
`, tooltip: `Do nothing`, }; case 'POP': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.pop`, html: `Instruction pop: Pop the top operand stack value
Format: pop
Operand Stack: ..., value → ...
Pop the top value from the operand stack.
`, tooltip: `Pop the top operand stack value`, }; case 'POP2': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.pop2`, html: `Instruction pop2: Pop the top one or two operand stack values
Format: pop2
Operand Stack: Form 1: ..., value2, value1 →
Pop the top one or two values from the operand stack.
`, tooltip: `Pop the top one or two operand stack values`, }; case 'PUTFIELD': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.putfield`, html: `Instruction putfield: Set field in object
Format: putfield indexbyte1 indexbyte2
Operand Stack: ..., objectref, value → ...
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a field (§5.1), 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 (§5.4.3.2).
Instruction putstatic: Set static field in class
Format: putstatic indexbyte1 indexbyte2
Operand Stack: ..., value → ...
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the run-time constant pool of the current class (§2.6), where the value of the index is (indexbyte1 <<
8) | indexbyte2. The run-time constant pool entry at the index must be a symbolic reference to a field (§5.1), 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 (§5.4.3.2).
Instruction ret: Return from subroutine
Format: ret index
Operand Stack: No change undefined
The index is an unsigned byte between 0 and 255, inclusive. The local variable at index in the current frame (§2.6) must contain a value of type returnAddress
. The contents of the local variable are written into the Java Virtual Machine's pc
register, and execution continues there.
Instruction return: Return void from method
Format: return
Operand Stack: ... → [empty]
The current method must have return type void
. If the current method is a synchronized
method, the monitor entered or reentered on invocation of the method is updated and possibly exited as if by execution of a monitorexit instruction (§monitorexit) in the current thread. If no exception is thrown, any values on the operand stack of the current frame (§2.6) are discarded.
Instruction saload: Load short from array
Format: saload
Operand Stack: ..., arrayref, index → ..., value
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.
Instruction sastore: Store into short array
Format: sastore
Operand Stack: ..., arrayref, index, value → ...
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.
Instruction sipush: Push short
Format: sipush byte1 byte2
Operand Stack: ... → ..., value
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.
Instruction swap: Swap the top two operand stack values
Format: swap
Operand Stack: ..., value2, value1 → ..., value1, value2
Swap the top two values on the operand stack.
`, tooltip: `Swap the top two operand stack values`, }; case 'TABLESWITCH': return { url: `https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-6.html#jvms-6.5.tableswitch`, html: `Instruction tableswitch: Access jump table by index and jump
Format: tableswitch <0-3 byte pad> defaultbyte1 defaultbyte2 defaultbyte3 defaultbyte4 lowbyte1 lowbyte2 lowbyte3 lowbyte4 highbyte1 highbyte2 highbyte3 highbyte4 jump offsets...
Operand Stack: ..., index → ...
A tableswitch is a variable-length instruction. Immediately after the tableswitch opcode, between zero and three bytes must act as padding, such that 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 are bytes constituting three signed 32-bit values: default, low, and high. Immediately following 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.
Instruction wide: Extend local variable index by additional bytes
Format: wide
Operand Stack: wide = 196 (0xc4) undefined
null
`, tooltip: `Extend local variable index by additional bytes`, }; } }