A, constant
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x00 |
nop |
Do nothing |
0x01 |
aconst_null |
willnull Push to the top of the stack |
0x02 |
iconst_m1 |
willint 型 - 1 Push to the top of the stack |
0x03 |
iconst_0 |
willint 型 0 Push to the top of the stack |
0x04 |
iconst_1 |
willint 型 1 Push to the top of the stack |
0x05 |
iconst_2 |
willint 型 2 Push to the top of the stack |
0x06 |
iconst_3 |
willint 型 3 Push to the top of the stack |
0x07 |
iconst_4 |
willint 型 4 Push to the top of the stack |
0x08 |
iconst_5 |
willint 型 5 Push to the top of the stack |
0x09 |
lconst_0 |
willlong 型 0 Push to the top of the stack |
0x0a |
lconst_1 |
willlong 型 1 Push to the top of the stack |
0x0b |
fconst_0 |
willfloat 型 0 Push to the top of the stack |
0x0c |
fconst_1 |
willfloat 型 1 Push to the top of the stack |
0x0d |
fconst_2 |
willfloat 型 2 Push to the top of the stack |
0x0e |
dconst_0 |
willdouble 型 0 Push to the top of the stack |
0x0f |
dconst_1 |
willdouble 型 1 Push to the top of the stack |
0x10 |
bipush |
Push constant value of a single byte to the top of the stack128 至 127 |
0x11 |
sipush |
Push a short constant value to the top of the stack32768 至 32767 |
0x12 |
Ide |
willint ,float 或 String Type constant values are pushed from the constant pool to the top of the stack |
0x13 |
Idc_w |
willint ,float 或 String Type constant values are pushed from the constant pool to the top of the stack (wide index) |
0x14 |
Idc2_w |
willlong 或 double Type constant values are pushed from the constant pool to the top of the stack (wide index) |
Second, load,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x15 |
iload |
Specifies theint Type local variables pushed to the top of the stack |
0x16 |
lload |
Specifies thelong Type local variables pushed to the top of the stack |
0x17 |
fload |
Specifies thefloat Type local variables pushed to the top of the stack |
0x18 |
dload |
Specifies thedouble Type local variables pushed to the top of the stack |
0x19 |
aload |
Pushes the specified reference type local variable to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x1a |
iload_0 |
Will be the first1 个 int Type local variables pushed to the top of the stack |
0x1b |
iload_1 |
Will be the first2 个 int Type local variables pushed to the top of the stack |
0x1c |
iload_2 |
Will be the first3 个 int Type local variables pushed to the top of the stack |
0x1d |
iload_3 |
Will be the first4 个 int Type local variables pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x1e |
lload_0 |
Will be the first1 个 long Type local variables pushed to the top of the stack |
0x1f |
lload_1 |
Will be the first2 个 long Type local variables pushed to the top of the stack |
0x20 |
lload_2 |
Will be the first3 个 long Type local variables pushed to the top of the stack |
0x21 |
lload_3 |
Will be the first4 个 long Type local variables pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x22 |
fload_0 |
Will be the first1 个 float Type local variables pushed to the top of the stack |
0x23 |
fload_1 |
Will be the first2 个 float Type local variables pushed to the top of the stack |
0x24 |
fload_2 |
Will be the first3 个 float Type local variables pushed to the top of the stack |
0x25 |
fload_3 |
Will be the first4 个 float Type local variables pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x26 |
dload_0 |
Will be the first1 个 double Type local variables pushed to the top of the stack |
0x27 |
dload_1 |
Will be the first2 个 double Type local variables pushed to the top of the stack |
0x28 |
dload_2 |
Will be the first3 个 double Type local variables pushed to the top of the stack |
0x29 |
dload_3 |
Will be the first4 个 double Type local variables pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x2a |
aload_0 |
Will be the first1 Two local variables of reference type are pushed to the top of the stack |
0x2b |
aload_1 |
Will be the first2 Two local variables of reference type are pushed to the top of the stack |
0x2c |
aload_2 |
Will be the first3 Two local variables of reference type are pushed to the top of the stack |
0x2d |
aload_3 |
Will be the first4 Two local variables of reference type are pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x2e |
iaload |
willint The specified element of a type array is pushed to the top of the stack |
0x2f |
laload |
willlong The specified element of a type array is pushed to the top of the stack |
0x30 |
faload |
willfloat The specified element of a type array is pushed to the top of the stack |
0x31 |
daload |
willdouble The specified element of a type array is pushed to the top of the stack |
0x32 |
aaload |
Pushes the specified element of the array of reference types to the top of the stack |
0x33 |
baload |
willboolean Type array orbyte The specified element of a type array is pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x34 |
caload |
willchar The specified element of a type array is pushed to the top of the stack |
0x35 |
saload |
willshort The specified element of a type array is pushed to the top of the stack |
Three, storage,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x36 |
istore |
The stackint The type value is stored in the specified local variable |
0x37 |
lstore |
The stacklong The type value is stored in the specified local variable |
0x38 |
fstore |
The stackfloat The type value is stored in the specified local variable |
0x39 |
dstore |
The stackdouble The type value is stored in the specified local variable |
0x3a |
astore |
Stores the top of the stack reference type value into the specified local variable |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x3b |
istore_0 |
The stackint The type value is stored in the1 Local variables |
0x3c |
istore_1 |
The stackint The type value is stored in the2 Local variables |
0x3d |
istore_2 |
The stackint The type value is stored in the3 Local variables |
0x3e |
istore_3 |
The stackint The type value is stored in the4 Local variables |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x3f |
lstore_0 |
The stacklong The type value is stored in the1 Local variables |
0x40 |
lstore_1 |
The stacklong The type value is stored in the2 Local variables |
0x41 |
lstore_2 |
The stacklong The type value is stored in the3 Local variables |
0x42 |
lstore_3 |
The stacklong The type value is stored in the4 Local variables |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x43 |
fstore_0 |
The stackfloat The type value is stored in the1 Local variables |
0x44 |
fstore_1 |
The stackfloat The type value is stored in the2 Local variables |
0x45 |
fstore_2 |
The stackfloat The type value is stored in the3 Local variables |
0x46 |
fstore_3 |
The stackfloat The type value is stored in the4 Local variables |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x47 |
dstore_0 |
The stackdouble The type value is stored in the1 Local variables |
0x48 |
dstore_1 |
The stackdouble The type value is stored in the2 Local variables |
0x49 |
dstore_2 |
The stackdouble The type value is stored in the3 Local variables |
0x4a |
dstore_3 |
The stackdouble The type value is stored in the4 Local variables |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x4b |
astore_0 |
Store the top of the stack reference type value to no1 Local variables |
0x4c |
astore_1 |
Store the top of the stack reference type value to no2 Local variables |
0x4d |
astore_2 |
Store the top of the stack reference type value to no3 Local variables |
0x4e |
astore_3 |
Store the top of the stack reference type value to no4 Local variables |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x4f |
iastore |
The stackint The type value is stored at the specified index position of the specified array |
0x50 |
lastore |
The stacklong The type value is stored at the specified index position of the specified array |
0x51 |
fastore |
The stackfloat The type value is stored at the specified index position of the specified array |
0x52 |
dastore |
The stackdouble The type value is stored at the specified index position of the specified array |
0x53 |
aastore |
Stores the top of the stack reference type value to the specified index position of the specified array |
0x54 |
bastore |
The stackboolean Type value orbyte The type value is stored at the specified index position of the specified array |
0x55 |
castore |
The stackchar The type value is stored at the specified index position of the specified array |
0x56 |
sastore |
The stackshort The type value is stored at the specified index position of the specified array |
Four, stack
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x57 |
pop |
Pop the top value of the stack. Note: the value cannot belong 或 double The type of |
0x58 |
pop2 |
The one at the top of the stacklong 或 double Type or two other types of values pop up |
0x59 |
dup |
Copies the top value of the stack and pushes it to the top |
0x5a |
dup_x1 |
Copy the top stack value and insert it below the top two values |
0x5b |
dup_x2 |
Copy the top stack value and insert it below the top two or three values |
0x5c |
dup2 |
Copy the one at the top of the stacklong 或 double Type, or two other types of values, and push them to the top of the stack |
0x5d |
dup2_x1 |
Copy one or two values from the top of the stack and insert them below the top two or three values |
0x5e |
dup2_x2 |
Copy one or two values from the top of the stack and insert them below the two, three, or four values from the top of the stack |
0x5f |
swap |
Swap the two values at the top of the stack. Note: values cannot belong 或 double The type of |
Five, the mathematical
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x60 |
iadd |
The top twoint Type values are added and pushed to the top of the stack |
0x61 |
ladd |
The top twolong Type values are added and pushed to the top of the stack |
0x62 |
fadd |
The top twofloat Type values are added and pushed to the top of the stack |
0x63 |
dadd |
The top twodouble Type values are added and pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x64 |
isub |
The top twoint Type values are subtracted and pushed to the top of the stack |
0x65 |
lsub |
The top twolong Type values are subtracted and pushed to the top of the stack |
0x66 |
fsub |
The top twofloat Type values are subtracted and pushed to the top of the stack |
0x67 |
dsub |
The top twodouble Type values are subtracted and pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x68 |
imul |
The top twoint Type values are multiplied and pushed to the top of the stack |
0x69 |
lmul |
The top twolong Type values are multiplied and pushed to the top of the stack |
0x6a |
fmul |
The top twofloat Type values are multiplied and pushed to the top of the stack |
0x6b |
dmul |
The top twodouble Type values are multiplied and pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x6c |
idiv |
The top twoint Type divides values and pushes the result to the top of the stack |
0x6d |
ldiv |
The top twolong Type divides values and pushes the result to the top of the stack |
0x6e |
fdiv |
The top twofloat Type divides values and pushes the result to the top of the stack |
0x6f |
ddiv |
The top twodouble Type divides values and pushes the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x70 |
irem |
The top twoint Type value modulo and push the result to the top of the stack |
0x71 |
lrem |
The top twolong Type value modulo and push the result to the top of the stack |
0x72 |
frem |
The top twofloat Type value modulo and push the result to the top of the stack |
0x73 |
drem |
The top twodouble Type value modulo and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x74 |
ineg |
The top twoint The type takes a negative value and pushes the result to the top of the stack |
0x75 |
lneg |
The top twolong The type takes a negative value and pushes the result to the top of the stack |
0x76 |
fneg |
The top twofloat The type takes a negative value and pushes the result to the top of the stack |
0x77 |
dneg |
The top twodouble The type takes a negative value and pushes the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x78 |
ishl |
willint The type value shifts the specified number of bits left and pushes the result to the top of the stack |
0x79 |
lshl |
will long The type value shifts the specified number of bits left and pushes the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x7a |
ishr |
willint The (signed) value of the type shifts the specified number of digits right and pushes the result to the top of the stack |
0x7b |
lshr |
willlong The (signed) value of the type shifts the specified number of digits right and pushes the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x7c |
iushr |
willint The (unsigned) value of the type shifts right to specify the number of digits and pushes the result to the top of the stack |
0x7d |
lushr |
willlong The (unsigned) value of the type shifts right to specify the number of digits and pushes the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x7e |
iand |
The top twoint Type values perform bitwise and and push the result to the top of the stack |
0x7f |
land |
The top twolong Type values perform bitwise and and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x80 |
ior |
The top twoint Type values are “bitwise or” and pushed to the top of the stack |
0x81 |
lor |
The top twolong Type values are “bitwise or” and pushed to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x82 |
ixor |
The top twoint Type values perform a bitwise xor operation and push the result to the top of the stack |
0x83 |
lxor |
The top twolong Type values perform a bitwise xor operation and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x84 |
iinc |
Will specifyint A type variable increments the specified value, as ini++ ,i-- ,i+=2 等 |
Six, conversion,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x85 |
i2l |
The stackint Type value cast tolong Type the value and push the result to the top of the stack |
0x86 |
i2f |
The stackint Type value cast tofloat Type the value and push the result to the top of the stack |
0x87 |
i2d |
The stackint Type value cast todouble Type the value and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x88 |
l2i |
The stacklong Type value cast toint Type the value and push the result to the top of the stack |
0x89 |
l2f |
The stacklong Type value cast tofloat Type the value and push the result to the top of the stack |
0x8a |
l2d |
The stacklong Type value cast todouble Type the value and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x8b |
f2i |
The stackfloat Type value cast toint Type the value and push the result to the top of the stack |
0x8c |
f2l |
The stackfloat Type value cast tolong Type the value and push the result to the top of the stack |
0x8d |
f2d |
The stackfloat Type value cast todouble Type the value and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x8e |
d2i |
The stackdouble Type value cast toint Type the value and push the result to the top of the stack |
0x8f |
d2l |
The stackdouble Type value cast tolong Type the value and push the result to the top of the stack |
0x90 |
d2f |
The stackdouble Type value cast tofloat Type the value and push the result to the top of the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x91 |
i2b |
The stackint Type value cast tobyte Type the value and push the result to the top of the stack |
0x92 |
i2c |
The stackint Type value cast tochar Type the value and push the result to the top of the stack |
0x93 |
i2s |
The stackint Type value cast toshort Type the value and push the result to the top of the stack |
Seven, comparison,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x94 |
lcmp |
Compare the top two on the stacklong Type numeric size and push the result to the top of the stack — value of the result:1 ,0 和 - 1 |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x95 |
fcmpl |
Compare the top two on the stackfloat Type numeric size and push the result to the top of the stack; When one of the values isNaN When will- 1 Pressure into the stack |
0x96 |
fcmpg |
Compare the top two on the stackfloat Type numeric size and push the result to the top of the stack; When one of the values isNaN When will1 Pressure into the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x97 |
dcmpl |
Compare the top two on the stackdouble Type numeric size and push the result to the top of the stack; When one of the values isNaN When will- 1 Pressure into the stack |
0x98 |
dcmpg |
Compare the top two on the stackdouble Type numeric size and push the result to the top of the stack; When one of the values isNaN When will1 Pressure into the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x99 |
ifeq |
When the stackint The type value is equal to0 When to jump |
0x9a |
ifne |
When the stackint The type value does not equal0 When to jump |
0x9b |
iflt |
When the stackint The type value is less than0 When to jump |
0x9c |
ifge |
When the stackint The type value is greater than or equal to0 When to jump |
0x9d |
ifgt |
When the stackint Type value greater than0 When to jump |
0x9e |
ifle |
When the stackint The type value is less than or equal to0 When to jump |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0x9f |
if_icmpeq |
Compare the top two on the stackint Type value size, jumps when the current equals the latter |
0xa0 |
if_icmpne |
Compare the top two on the stackint Type value size, jump if the current does not equal the latter |
0xa1 |
if_icmplt |
Compare the top two on the stackint Type value size, jump if the current is less than the latter |
0xa2 |
if_icmpge |
Compare the top two on the stackint Type value size, jump if the current is greater than or equal to the latter |
0xa3 |
if_icmpgt |
Compare the top two on the stackint Type value size, jump if the current is greater than the latter |
0xa4 |
if_icmple |
Compare the top two on the stackint Type value size, jump if the current is less than or equal to the latter |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xa5 |
if_acmpeq |
Compares values of two reference types at the top of the stack, jumping if the results are equal |
0xa6 |
if_acmpne |
Compares values of two reference types at the top of the stack, jumping if the results are not equal |
Eight, control,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xa7 |
goto |
Unconditional jump |
0xa8 |
jsr |
Jump to the specified16 位 offset Location, and willjsr The address of the next instruction is pushed to the top of the stack |
0xa9 |
ret |
Returns the value specified by the local variableindex The command position, generally andjsr ,jsr_w A combination of |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xaa |
tableswitch |
Used forswitch Conditional jump,case Value continuous (variable-length instruction) |
0xab |
lookupswitch |
Used forswitch Conditional jump,case Value discontinuity (variable-length instruction) |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xac |
ireturn |
Returns from the current methodint |
0xad |
lreturn |
Returns from the current methodlong |
0xae |
freturn |
Returns from the current methodfloat |
0xaf |
dreturn |
Returns from the current methoddouble |
0xb0 |
areturn |
Returns an object reference from the current method |
0xb1 |
return |
Returns from the current methodvoid |
Nine, references,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xb2 |
getstatic |
Gets the static field of the specified class and pushes its value to the top of the stack |
0xb3 |
putstatic |
Assign a static field to the specified class |
0xb4 |
getfield |
Gets the instance field of the specified class and pushes its value to the top of the stack |
0xb5 |
putfield |
Assigns a value to the instance field of the specified class |
0xb6 |
invokevirtual |
Calling instance methods |
0xb7 |
invokespecial |
Call parent class methods, instance initializer methods, private methods |
0xb8 |
invokestatic |
Calling static methods |
0xb9 |
invokeinterface |
Calling interface methods |
0xba |
invokedynamic |
To call the dynamic linking method, note:Java SE 7 Previous versions did not use a value of186 opcode |
0xbb |
new |
Creates an object and pushes its reference to the top of the stack |
0xbc |
newarray |
Creates an array of the specified primitive type and pushes its reference value to the top of the stack |
0xbd |
anewarray |
Creates an array of references (such as classes, interfaces, arrays) and pushes its reference values to the top of the stack |
0xbe |
arraylength |
Get the length of the array and push it to the top of the stack |
0xbf |
athrow |
Throws the exception at the top of the stack |
0xc0 |
checkcast |
Check for type conversions. Failure to check is thrownClassCastException |
0xc1 |
instanceof |
Checks if the object is an instance of the specified class, and if so1 Push to the top of the stack, otherwise0 Pressure into the stack |
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xc2 |
monitorenter |
Gets the lock of the object used to implement synchronized blocks |
0xc3 |
monitorexit |
Release the lock on an object to synchronize the block |
Ten, extension,
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xc4 |
wide |
Expand the width of a local variable |
0xc5 |
multianewarray |
Creates a multidimensional array of the specified type and the specified dimension (to execute this instruction, the stack must contain the length values for each dimension) and pushes its reference values to the top of the stack |
0xc6 |
ifnull |
fornull When to jump |
0xc7 |
ifnonnull |
Don’t fornull When to jump |
0xc8 |
goto_w |
Unconditional jump (wide index) |
0xc9 |
jsr_w |
Jump to the specified32 位 offset Location, and willjsr_w The address of the next instruction is pushed to the top of the stack |
11. Reserve orders
The bytecode | mnemonics | Instruction meaning |
---|---|---|
0xca |
breakpoint |
A breakpoint marker for debugging |
0xfe |
impdep1 |
A language backdoor reserved for specific software |
0xff |
impdep2 |
Language backdoors reserved for specific hardware |