常量入栈(操作数栈)指令
- bipush[1]
- sipush[2]
- aconst_null
- iconst_m1[3]
- iconst_x[4]
- lconst_0
- lconst_1
- fconst_0
- fconst_1
- fconst_2
- dconst_0
- dconst_1
- ldc[5]
- ldc_w[6]
- ldc2_w[7]
局部变量压栈(操作数栈)指令
- xload (x={i, f, l, d, a})
- xload_n (x={i, f, l, d, a} n={0, 1, 2, 3})[8]
- xaload (x={i, f, l, d, a, b, c, s})
出栈(操作数栈)装入局部变量表指令
- xstore
- xstore_x
- xastore
通用型操作
- NOP
- dup
- dup2
- pop
- pop2
类型转换指令
- x2y (x={i, f, l, d}, y={i, f, l, d, c, s, b})[9]
运算指令
- 加法指令:iadd, ladd, fadd, dadd
- 减法指令:isub, lsub, fsub, dsub
- 乘法指令:imul, lmul, fmul, dmul
- 除法指令:idiv, ldiv, fdiv, ddiv
- 取余指令:irem, lrem, frem, drem
- 数值取反:ineg, lneg, fneg, dneg
- 自增指令:iinc[10]
- 位运算指令
- 位移指令:ishl, ishr, iushr, lshl, lshr, lushr
- 按位或指令:ior, lor
- 按位与指令:iand, land
- 按位异或指令:ixor, lxor
对象/数组操作指令
- 创建指令:new, newarray, anewarray, multianewarray
- 字段访问指令:getfield, putfield, getstatic, putstatic
- 类型检查指令:checkcast, instanceof
- 数组操作指令:xastore, xaload, arraylength
比较控制指令
- 比较指令:dcmpg, dcmpl, fcmpg, fcmpl, lcmp
- 条件跳转指令:ifeq, iflt, ifle, ifne, ifgt, ifge, ifnull, ifnonnull
- 比较条件跳转指令:if_icmpeq, if_icmpne, if_icmplt, if_icmpgt, if_icmple, if_icmpge, if_acmpeq, if_acmpne
- 多条件分支跳转:tableswitch, lookupswitch
- 无条件跳转:goto, goto_w
函数调用与返回指令
同步控制
- monitorenter
- monitorexit
-
接收8位整数作为参数 ↩
-
接收16位整数作为参数 ↩
-
将-1压入操作数栈 ↩
-
将x压入操作数栈,x为0~5 ↩
-
接收一个8位参数,该参数指向常量池中的int、float或String ↩
-
接收两个8位参数,能支持的索引范围大于ldc ↩
-
要压入的元素是long或double ↩
-
n表示第n个局部变量 ↩
-
x取不到c,s和b,是因为在局部变量表中每个槽位是32位,char,short和byte在局部变量表中也占32位,也就是将它们视为int ↩
-
少数几个完全不修改操作数栈的指令,需要2个操作数:第1个为局部变量表的位置,第2个为累加数; ↩
-
对象的实例方法 ↩
-
构造函数,类的私有方法,父类方法,这些方法都是静态绑定的 ↩