Instructions in the Java Virtual Machine consist of a byte long number (opcode) that represents the meaning of a particular operation, followed by zero or more parameters (operands) that represent the required parameters of the operation. Bytecode instruction set is an instruction set architecture with distinct characteristics and prominent advantages and disadvantages. Because the length of Java virtual machine opcodes is limited to one byte, the total number of opcodes in the instruction set cannot exceed 256.
Loading and storing instructions
-
Loads a local variable into the action stack
Iload, iload_<n>, lload, lload_<n>, fload, fload_<n>, dload, dload_<n>, aload, aload_<n>
-
Stores a value from the operand stack to the local variable table
Fstore, fstore_<n>, dstore, dstore_<n>, astore, astore_<n>, istore, istore_<n>, lstore, lstore_<n>
-
Loads a constant into the operand stack
Bipush, sipush, LDC, ldc_w, ldc2_w, aconst_null, iconst_ml, iconst_< I >, lconst_<l>, fconst_<f>, dconst_<d>
-
Expand local variable table access index instruction
wide
Operation instruction
-
Add instruction
IADD, LADD, FADD, DADD
-
Subtraction instructions
ISUB, LSUB, FSUB, DSUB
-
Multiplication instructions
IMUL, LMUL, FMUL, DMUL
-
Division instructions
IDIV, LDIV, FDIV, DDIV
-
For more instruction
IREM, LREM, FREM, DREM
-
Take the instruction
INEG, LNEG, FNEG, DNEG
-
Displacement instructions
Ishl, ishr, iushr, LSHL, lshe, lushr
-
By bits or instructions
Ior, lor
-
By bit and instruction
Iand, land
-
Bit by bit XOR instruction
Ixor, lxor
-
Local variable increment instruction
iinc
-
More instructions
DCMPG, DCMPL, FCMPG, FCMPL, LCMP