# Any line that doesn't have a-z in the 1st column is a comment.
#
# The first column is the name of the opcodes. The second column is the
# total length of the instruction. We use 99 for tableswitch and
# tablelookup, which must always be treated as special cases.
#
# The third and fourth colum give what the opcode pops off the stack, and
# what it then pushes back onto the stack
# - <no effect on stack>
# I integer
# L long integer
# F float
# D double float
# A address [array or object]
# O object only
# R return address (for jsr)
# a integer, array, or object
# ? unknown
# [I], [L], [F], [D], [A], [B], [C], [?]
# array of integer, long, float, double, address, bytes,
# chars, or anything
# 1,2,3,4,+ used by stack duplicating/popping routines.
#
# 1,2,3,4 represent >>any<< stack type except long or double. Two numbers
# separated by a + (in the third column) indicate that the two, together, can
# be used for a double or long. (Or they can represent two non-long items).
#
#
nop 1 - - /* nop */
aconst_null 1 - A /* push null object */
iconst_m1 1 - I /* push integer constant -1 */
iconst_0 1 - I /* push integer constant 0 */
iconst_1 1 - I /* push integer constant 1 */
iconst_2 1 - I /* push integer constant 2 */
iconst_3 1 - I /* push integer constant 3 */
iconst_4 1 - I /* push integer constant 4 */
iconst_5 1 - I /* push integer constant 5 */
lconst_0 1 - L /* push long 0L */
lconst_1 1 - L /* push long 1L */
fconst_0 1 - F /* push float constant 0.0 */
fconst_1 1 - F /* push float constant 1.0 */
fconst_2 1 - F /* push float constant 2.0 */
dconst_0 1 - D /* push double float constant 0.0d */
dconst_1 1 - D /* push double float constant 1.0d */
bipush 2 - I /* push byte-sized value */
sipush 3 - I /* push two-byte value */
ldc 2 - ? /*load a const from constant table */
ldc_w 3 - ?
ldc2_w 3 - ? /* load a 2-word constant . . . */
iload 2 - I /* load local integer variable */
lload 2 - L /* load local long variable */
fload 2 - F /* load local floating variable */
dload 2 - D /* load local double variable */
aload 2 - A /* load local object variable */
iload_0 1 - I /* load local integer variable #0 */
iload_1 1 - I /* load local integer variable #1 */
iload_2 1 - I /* load local integer variable #2 */
iload_3 1 - I /* load local integer variable #3 */
lload_0 1 - L /* load local long variable #0 */
lload_1 1 - L /* load local long variable #1 */
lload_2 1 - L /* load local long variable #2 */
lload_3 1 - L /* load local long variable #3 */
fload_0 1 - F /* load local float variable #0 */
fload_1 1 - F /* load local float variable #1 */
fload_2 1 - F /* load local float variable #2 */
fload_3 1 - F /* load local float variable #3 */
dload_0 1 - D /* load lcl double float variable #0 */
dload_1 1 - D /* load lcl double float variable #1 */
dload_2 1 - D /* load lcl double float variable #2 */
dload_3 1 - D /* load lcl double float variable #3 */
aload_0 1 - A /* load local object variable #0 */
aload_1 1 - A /* load local object variable #1 */
aload_2 1 - A /* load local object variable #2 */
aload_3 1 - A /* load local object variable #3 */
iaload 1 [I]I I /* load from array of integer */
laload 1 [L]I L /* load from array of long */
faload 1 [F]I F /* load from array of float */
daload 1 [D]I D /* load from array of double */
aaload 1 [A]I A /* load from array of object */
baload 1 [B]I I /* load from array of (signed) bytes */
caload 1 [C]I I /* load from array of chars */
saload 1 [S]I I /* load from array of (signed) shorts */
istore 2 I - /* store local integer variable */
lstore 2 L - /* store local long variable */
fstore 2 F - /* store local float variable */
dstore 2 D - /* store local double variable */
astore 2 A - /* store local object variable */
istore_0 1 I - /* store local integer variable #0 */
istore_1 1 I - /* store local integer variable #1 */
istore_2 1 I - /* store local integer variable #2 */
istore_3 1 I - /* store local integer variable #3 */
lstore_0 1 L - /* store local long variable #0 */
lstore_1 1 L - /* store local long variable #1 */
lstore_2 1 L - /* store local long variable #2 */
lstore_3 1 L - /* store local long variable #3 */
fstore_0 1 F - /* store local float variable #0 */
fstore_1 1 F - /* store local float variable #1 */
fstore_2 1 F - /* store local float variable #2 */
fstore_3 1 F - /* store local float variable #3 */
dstore_0 1 D - /* store lcl double float variable #0 */
dstore_1 1 D - /* store lcl double float variable #1 */
dstore_2 1 D - /* store lcl double float variable #2 */
dstore_3 1 D - /* store lcl double float variable #3 */
astore_0 1 A - /* store local object variable #0 */
astore_1 1 A - /* store local object variable #1 */
astore_2 1 A - /* store local object variable #2 */
astore_3 1 A - /* store local object variable #3 */
iastore 1 [I]II - /* store into array of int */
lastore 1 [L]IL - /* store into array of long */
fastore 1 [F]IF - /* store into array of float */
dastore 1 [D]ID - /* store into array of double float */
aastore 1 [A]IA - /* store into array of object */
bastore 1 [B]II - /* store into array of (signed) bytes */
castore 1 [C]II - /* store into array of chars */
sastore 1 [S]II - /* store into array of (signed) shorts*/
pop 1 1 - /* pop top element */
pop2 1 2+1 - /* pop top two elements */
dup 1 1 11 /* dup top element */
dup_x1 1 2+1 121 /* dup top element. Skip one */
dup_x2 1 3+21 1321 /* dup top element. Skip two */
dup2 1 2+1 2121 /* dup top two elements. Delete? */
dup2_x1 1 32+1 21321 /* dup top 2 elements. Skip one */
dup2_x2 1 4+32+1 214321 /* dup top 2 elements. Skip two */
swap 1 21 12 /* swap top two elements of stack. */
iadd 1 II I /* integer add */
ladd 1 LL L /* long add */
fadd 1 FF F /* floating add */
dadd 1 DD D /* double float add */
isub 1 II I /* integer subtract */
lsub 1 LL L /* long subtract */
fsub 1 FF F /* floating subtract */
dsub 1 DD D /* floating double subtract */
imul 1 II I /* integer multiply */
lmul 1 LL L /* long multiply */
fmul 1 FF F /* floating multiply */
dmul 1 DD D /* double float multiply */
idiv 1 II I /* integer divide */
ldiv 1 LL L /* long divide */
fdiv 1 FF F /* floating divide */
ddiv 1 DD D /* double float divide */
irem 1 II I /* integer mod */
lrem 1 LL L /* long mod */
frem 1 FF F /* floating mod */
drem 1 DD D /* double float mod */
ineg 1 I I /* integer negate */
lneg 1 L L /* long negate */
fneg 1 F F /* floating negate */
dneg 1 D D /* double float negate */
ishl 1 II I /* shift left */
lshl 1 LI L /* long shift left */
ishr 1 II I /* shift right */
lshr 1 LI L /* long shift right */
iushr 1 II I /* unsigned shift right */
lushr 1 LI L /* long unsigned shift right */
iand 1 II I /* boolean and */
land 1 LL L /* long boolean and */
ior 1 II I /* boolean or */
lor 1 LL L /* long boolean or */
ixor 1 II I /* boolean xor */
lxor 1 LL L /* long boolean xor */
iinc 3 - - /* increment lcl variable by constant */
i2l 1 I L /* integer to long */
i2f 1 I F /* integer to float */
i2d 1 I D /* integer to double */
l2i 1 L I /* long to integer */
l2f 1 L F /* long to float */
l2d 1 L D /* long to double */
f2i 1 F I /* float to integer */
f2l 1 F L /* float to long */
f2d 1 F D /* float to double */
d2i 1 D I /* double to integer */
d2l 1 D L /* double to long */
d2f 1 D F /* double to float */
int2byte 1 I I /* integer to byte */
int2char 1 I I /* integer to character */
int2short 1 I I /* integer to signed short */
lcmp 1 LL I /* long compare */
fcmpl 1 FF I /* float compare. -1 on incomparable */
fcmpg 1 FF I /* float compare. 1 on incomparable */
dcmpl 1 DD I /* dbl floating cmp. -1 on incomp */
dcmpg 1 DD I /* dbl floating cmp. 1 on incomp */
ifeq 3 a - /* goto if equal */
ifne 3 a - /* goto if not equal */
iflt 3 I - /* goto if less than */
ifge 3 I - /* goto if greater than or equal */
ifgt 3 I - /* goto if greater than */
ifle 3 I - /* goto if less than or equal */
if_icmpeq 3 II - /* compare top two elements of stack */
if_icmpne 3 II - /* compare top two elements of stack */
if_icmplt 3 II - /* compare top two elements of stack */
if_icmpge 3 II - /* compare top two elements of stack */
if_icmpgt 3 II - /* compare top two elements of stack */
if_icmple 3 II - /* compare top two elements of stack */
if_acmpeq 3 AA - /* compare top two objects of stack */
if_acmpne 3 AA - /* compare top two objects of stack */
goto 3 - - /* unconditional goto */
jsr 3 - R /* jump subroutine */
ret 2 - - /* return from subroutine */
tableswitch 99 I - /* goto (case) */
lookupswitch 99 I - /* goto (case) */
ireturn 1 I - /* return integer from procedure */
lreturn 1 L - /* return long from procedure */
freturn 1 F - /* return float from procedure */
dreturn 1 D - /* return double from procedure */
areturn 1 A - /* return object from procedure */
return 1 - - /* return (void) from procedure */
getstatic 3 - ? /*get static field value. */
putstatic 3 ? - /* assign static field value */
getfield 3 A ? /*get field value from object. */
putfield 3 ? - /* assign field value to object. */
invokevirtual 3 ? ? /*call method, based on object. */
invokenonvirtual 3 ? ? /*call method, not based on object. */
invokestatic 3 ? ? /*call a static method. */
invokeinterface 5 ? ? /*call an interface method */
xxxunusedxxx 0 ? ? /* was newfromname */
new 3 - A /* Create a new object */
newarray 2 I A /* Create a new array of non-objects*/
anewarray 3 I A /* Create a new array of objects */
arraylength 1 [?] I /* get length of array */
athrow 1 O - /* throw an exception */
checkcast 3 O A /* error if object not of given type */
instanceof 3 O I /* is object of given type? */
monitorenter 1 O - /* enter a monitored region of code */
monitorexit 1 O - /* exit a monitored region of code */
wide 0 - - /* prefix operation. */
multianewarray 4 ? A /* create multidimensional array */
ifnull 3 A - /* goto if null */
ifnonnull 3 A - /* goto if not null */
# The following instructions are "long" versions. They allow access to
# variables with index greater than 255.
goto_w 5 - - /* unconditional goto. 4byte offset */
jsr_w 5 - R /* jump subroutine. 4byte offset */
breakpoint 1 - - /* call breakpoint handler */
# The compiler will not generate any of the following instructions. That
# are created by the interpreter from the non _quick versions of the
# instructions.
ldc_quick 2 - ?
ldc_w_quick 3 - ?
ldc2_w_quick 3 - ?
getfield_quick 3 A ?
putfield_quick 3 ? -
getfield2_quick 3 A ?
putfield2_quick 3 ? -
getstatic_quick 3 - ?
putstatic_quick 3 ? -
getstatic2_quick 3 - ?
putstatic2_quick 3 ? _
invokevirtual_quick 3 ? ?
invokenonvirtual_quick 3 ? ?
invokesuper_quick 3 ? ?
invokestatic_quick 3 ? ?
invokeinterface_quick 5 ? ?
invokevirtualobject_quick 3 ? ?
invokeignored_quick 3 ? ?
new_quick 3 - A
anewarray_quick 3 I A
multianewarray_quick 4 ? A
checkcast_quick 3 A A
instanceof_quick 3 A I
# The following are generated when the offset is bigger than 255
invokevirtual_quick_w 3 ? ?
getfield_quick_w 3 A ?
putfield_quick_w 3 ? -