|
11 | 11 |
|
12 | 12 | @SuppressWarnings("unused") |
13 | 13 | public final class JvmInstructions { |
| 14 | + // const instructions |
14 | 15 | public static final NoArgInstruction ACONST_NULL = new NoArgInstruction(0x01); |
| 16 | + |
| 17 | + public static final NoArgInstruction DCONST_0 = new NoArgInstruction(0x0e); |
| 18 | + public static final NoArgInstruction DCONST_1 = new NoArgInstruction(0x0f); |
| 19 | + |
| 20 | + public static final NoArgInstruction FCONST_0 = new NoArgInstruction(0x0b); |
| 21 | + public static final NoArgInstruction FCONST_1 = new NoArgInstruction(0x0c); |
| 22 | + public static final NoArgInstruction FCONST_2 = new NoArgInstruction(0x0d); |
| 23 | + |
| 24 | + public static final NoArgInstruction ICONST_M1 = new NoArgInstruction(0x02); |
| 25 | + public static final NoArgInstruction ICONST_0 = new NoArgInstruction(0x03); |
| 26 | + public static final NoArgInstruction ICONST_1 = new NoArgInstruction(0x04); |
| 27 | + public static final NoArgInstruction ICONST_2 = new NoArgInstruction(0x05); |
| 28 | + public static final NoArgInstruction ICONST_3 = new NoArgInstruction(0x06); |
| 29 | + public static final NoArgInstruction ICONST_4 = new NoArgInstruction(0x07); |
| 30 | + public static final NoArgInstruction ICONST_5 = new NoArgInstruction(0x08); |
| 31 | + |
| 32 | + public static final NoArgInstruction LCONST_0 = new NoArgInstruction(0x09); |
| 33 | + public static final NoArgInstruction LCONST_1 = new NoArgInstruction(0x0a); |
| 34 | + |
| 35 | + public static final CPInstruction<ConstantPoolEntry> LDC = new CPInstruction<>(0x12); |
| 36 | + public static final CPInstruction<ConstantPoolEntry> LDC_W = new CPInstruction<>(0x13); |
| 37 | + public static final CPInstruction<ConstantPoolEntry> LDC2_W = new CPInstruction<>(0x14); |
| 38 | + |
| 39 | + public static final BPInstruction BIPUSH = new BPInstruction(0x10); |
| 40 | + |
| 41 | + // load instructions |
15 | 42 | public static final BPInstruction ALOAD = new BPInstruction(0x19); |
16 | 43 | public static final NoArgInstruction ALOAD_0 = new NoArgInstruction(0x2a); |
17 | 44 | public static final NoArgInstruction ALOAD_1 = new NoArgInstruction(0x2b); |
18 | 45 | public static final NoArgInstruction ALOAD_2 = new NoArgInstruction(0x2c); |
19 | 46 | public static final NoArgInstruction ALOAD_3 = new NoArgInstruction(0x2d); |
20 | | - public static final CPInstruction<ClassEntry> ANEWARRAY = new CPInstruction<>(0xbd); |
21 | | - public static final NoArgInstruction ARETURN = new NoArgInstruction(0xb0); |
22 | | - public static final BPInstruction ASTORE = new BPInstruction(0x3a); |
23 | | - public static final NoArgInstruction ASTORE_0 = new NoArgInstruction(0x4b); |
24 | | - public static final NoArgInstruction ASTORE_1 = new NoArgInstruction(0x4c); |
25 | | - public static final NoArgInstruction ASTORE_2 = new NoArgInstruction(0x4d); |
26 | | - public static final NoArgInstruction ASTORE_3 = new NoArgInstruction(0x4e); |
27 | | - public static final BPInstruction BIPUSH = new BPInstruction(0x10); |
28 | | - public static final NoArgInstruction DCONST_0 = new NoArgInstruction(0x0e); |
29 | | - public static final NoArgInstruction DCONST_1 = new NoArgInstruction(0x0f); |
| 47 | + |
30 | 48 | public static final BPInstruction DLOAD = new BPInstruction(0x18); |
31 | 49 | public static final NoArgInstruction DLOAD_0 = new NoArgInstruction(0x26); |
32 | 50 | public static final NoArgInstruction DLOAD_1 = new NoArgInstruction(0x27); |
33 | 51 | public static final NoArgInstruction DLOAD_2 = new NoArgInstruction(0x28); |
34 | 52 | public static final NoArgInstruction DLOAD_3 = new NoArgInstruction(0x29); |
35 | | - public static final NoArgInstruction DRETURN = new NoArgInstruction(0xaf); |
36 | | - public static final BPInstruction DSTORE = new BPInstruction(0x39); |
37 | | - public static final NoArgInstruction DSTORE_0 = new NoArgInstruction(0x47); |
38 | | - public static final NoArgInstruction DSTORE_1 = new NoArgInstruction(0x48); |
39 | | - public static final NoArgInstruction DSTORE_2 = new NoArgInstruction(0x49); |
40 | | - public static final NoArgInstruction DSTORE_3 = new NoArgInstruction(0x4a); |
41 | | - public static final NoArgInstruction DUP = new NoArgInstruction(0x59); |
42 | | - public static final NoArgInstruction FCONST_0 = new NoArgInstruction(0x0b); |
43 | | - public static final NoArgInstruction FCONST_1 = new NoArgInstruction(0x0c); |
44 | | - public static final NoArgInstruction FCONST_2 = new NoArgInstruction(0x0d); |
| 53 | + |
45 | 54 | public static final BPInstruction FLOAD = new BPInstruction(0x17); |
46 | 55 | public static final NoArgInstruction FLOAD_0 = new NoArgInstruction(0x22); |
47 | 56 | public static final NoArgInstruction FLOAD_1 = new NoArgInstruction(0x23); |
48 | 57 | public static final NoArgInstruction FLOAD_2 = new NoArgInstruction(0x24); |
49 | 58 | public static final NoArgInstruction FLOAD_3 = new NoArgInstruction(0x25); |
50 | | - public static final NoArgInstruction FRETURN = new NoArgInstruction(0xae); |
51 | | - public static final BPInstruction FSTORE = new BPInstruction(0x38); |
52 | | - public static final NoArgInstruction FSTORE_0 = new NoArgInstruction(0x43); |
53 | | - public static final NoArgInstruction FSTORE_1 = new NoArgInstruction(0x44); |
54 | | - public static final NoArgInstruction FSTORE_2 = new NoArgInstruction(0x45); |
55 | | - public static final NoArgInstruction FSTORE_3 = new NoArgInstruction(0x46); |
56 | | - public static final CPInstruction<FieldrefEntry> GETFIELD = new CPInstruction<>(0xb4); |
57 | | - public static final CPInstruction<FieldrefEntry> GETSTATIC = new CPInstruction<>(0xb2); |
58 | | - public static final BranchInstruction GOTO = new BranchInstruction(0xa7); |
59 | | - public static final BranchInstruction GOTO_W = new BranchInstruction(0xc8); |
60 | | - public static final NoArgInstruction IADD = new NoArgInstruction(0x60); |
61 | | - public static final NoArgInstruction IALOAD = new NoArgInstruction(0x2e); |
62 | | - public static final NoArgInstruction IASTORE = new NoArgInstruction(0x4f); |
63 | | - public static final NoArgInstruction ICONST_0 = new NoArgInstruction(0x03); |
64 | | - public static final NoArgInstruction ICONST_1 = new NoArgInstruction(0x04); |
65 | | - public static final NoArgInstruction ICONST_2 = new NoArgInstruction(0x05); |
66 | | - public static final NoArgInstruction ICONST_3 = new NoArgInstruction(0x06); |
67 | | - public static final NoArgInstruction ICONST_4 = new NoArgInstruction(0x07); |
68 | | - public static final NoArgInstruction ICONST_5 = new NoArgInstruction(0x08); |
69 | | - public static final NoArgInstruction ICONST_M1 = new NoArgInstruction(0x02); |
70 | | - public static final BranchInstruction IFNE = new BranchInstruction(0x9a); |
71 | | - public static final TPInstruction IINC = new TPInstruction(0x84); |
| 59 | + |
72 | 60 | public static final BPInstruction ILOAD = new BPInstruction(0x15); |
73 | 61 | public static final NoArgInstruction ILOAD_0 = new NoArgInstruction(0x1a); |
74 | 62 | public static final NoArgInstruction ILOAD_1 = new NoArgInstruction(0x1b); |
75 | 63 | public static final NoArgInstruction ILOAD_2 = new NoArgInstruction(0x1c); |
76 | 64 | public static final NoArgInstruction ILOAD_3 = new NoArgInstruction(0x1d); |
77 | | - public static final CPInstruction<MethodrefEntry> INVOKESTATIC = new CPInstruction<>(0xb8); |
78 | | - public static final CPInstruction<MethodrefEntry> INVOKEVIRTUAL = new CPInstruction<>(0xb6); |
79 | | - public static final NoArgInstruction IRETURN = new NoArgInstruction(0xac); |
80 | | - public static final BPInstruction ISTORE = new BPInstruction(0x36); |
81 | | - public static final NoArgInstruction ISTORE_0 = new NoArgInstruction(0x3b); |
82 | | - public static final NoArgInstruction ISTORE_1 = new NoArgInstruction(0x3c); |
83 | | - public static final NoArgInstruction ISTORE_2 = new NoArgInstruction(0x3d); |
84 | | - public static final NoArgInstruction ISTORE_3 = new NoArgInstruction(0x3e); |
85 | | - public static final NoArgInstruction ISUB = new NoArgInstruction(0x64); |
86 | | - public static final NoArgInstruction LCONST_0 = new NoArgInstruction(0x09); |
87 | | - public static final NoArgInstruction LCONST_1 = new NoArgInstruction(0x0a); |
88 | | - public static final CPInstruction<ConstantPoolEntry> LDC = new CPInstruction<>(0x12); |
89 | | - public static final CPInstruction<ConstantPoolEntry> LDC2_W = new CPInstruction<>(0x14); |
90 | | - public static final CPInstruction<ConstantPoolEntry> LDC_W = new CPInstruction<>(0x13); |
| 65 | + |
91 | 66 | public static final BPInstruction LLOAD = new BPInstruction(0x16); |
92 | 67 | public static final NoArgInstruction LLOAD_0 = new NoArgInstruction(0x1e); |
93 | 68 | public static final NoArgInstruction LLOAD_1 = new NoArgInstruction(0x1f); |
94 | 69 | public static final NoArgInstruction LLOAD_2 = new NoArgInstruction(0x20); |
95 | 70 | public static final NoArgInstruction LLOAD_3 = new NoArgInstruction(0x21); |
96 | | - public static final NoArgInstruction LRETURN = new NoArgInstruction(0xad); |
| 71 | + |
| 72 | + // store instructions |
| 73 | + public static final BPInstruction ASTORE = new BPInstruction(0x3a); |
| 74 | + public static final NoArgInstruction ASTORE_0 = new NoArgInstruction(0x4b); |
| 75 | + public static final NoArgInstruction ASTORE_1 = new NoArgInstruction(0x4c); |
| 76 | + public static final NoArgInstruction ASTORE_2 = new NoArgInstruction(0x4d); |
| 77 | + public static final NoArgInstruction ASTORE_3 = new NoArgInstruction(0x4e); |
| 78 | + |
| 79 | + public static final BPInstruction DSTORE = new BPInstruction(0x39); |
| 80 | + public static final NoArgInstruction DSTORE_0 = new NoArgInstruction(0x47); |
| 81 | + public static final NoArgInstruction DSTORE_1 = new NoArgInstruction(0x48); |
| 82 | + public static final NoArgInstruction DSTORE_2 = new NoArgInstruction(0x49); |
| 83 | + public static final NoArgInstruction DSTORE_3 = new NoArgInstruction(0x4a); |
| 84 | + |
| 85 | + public static final BPInstruction FSTORE = new BPInstruction(0x38); |
| 86 | + public static final NoArgInstruction FSTORE_0 = new NoArgInstruction(0x43); |
| 87 | + public static final NoArgInstruction FSTORE_1 = new NoArgInstruction(0x44); |
| 88 | + public static final NoArgInstruction FSTORE_2 = new NoArgInstruction(0x45); |
| 89 | + public static final NoArgInstruction FSTORE_3 = new NoArgInstruction(0x46); |
| 90 | + |
| 91 | + public static final BPInstruction ISTORE = new BPInstruction(0x36); |
| 92 | + public static final NoArgInstruction ISTORE_0 = new NoArgInstruction(0x3b); |
| 93 | + public static final NoArgInstruction ISTORE_1 = new NoArgInstruction(0x3c); |
| 94 | + public static final NoArgInstruction ISTORE_2 = new NoArgInstruction(0x3d); |
| 95 | + public static final NoArgInstruction ISTORE_3 = new NoArgInstruction(0x3e); |
| 96 | + |
97 | 97 | public static final BPInstruction LSTORE = new BPInstruction(0x37); |
98 | 98 | public static final NoArgInstruction LSTORE_0 = new NoArgInstruction(0x3f); |
99 | 99 | public static final NoArgInstruction LSTORE_1 = new NoArgInstruction(0x40); |
100 | 100 | public static final NoArgInstruction LSTORE_2 = new NoArgInstruction(0x41); |
101 | 101 | public static final NoArgInstruction LSTORE_3 = new NoArgInstruction(0x42); |
| 102 | + |
| 103 | + // field/method operations |
| 104 | + public static final CPInstruction<FieldrefEntry> GETFIELD = new CPInstruction<>(0xb4); |
| 105 | + public static final CPInstruction<FieldrefEntry> GETSTATIC = new CPInstruction<>(0xb2); |
| 106 | + public static final CPInstruction<MethodrefEntry> INVOKESTATIC = new CPInstruction<>(0xb8); |
| 107 | + public static final CPInstruction<MethodrefEntry> INVOKEVIRTUAL = new CPInstruction<>(0xb6); |
| 108 | + |
| 109 | + // math |
| 110 | + public static final NoArgInstruction IADD = new NoArgInstruction(0x60); |
| 111 | + public static final NoArgInstruction ISUB = new NoArgInstruction(0x64); |
| 112 | + |
| 113 | + public static final TPInstruction IINC = new TPInstruction(0x84); |
| 114 | + |
| 115 | + // array operations |
| 116 | + public static final NoArgInstruction IALOAD = new NoArgInstruction(0x2e); |
| 117 | + public static final NoArgInstruction IASTORE = new NoArgInstruction(0x4f); |
| 118 | + |
| 119 | + // branching instructions |
| 120 | + public static final BranchInstruction GOTO = new BranchInstruction(0xa7); |
| 121 | + public static final BranchInstruction GOTO_W = new BranchInstruction(0xc8); |
| 122 | + |
| 123 | + public static final BranchInstruction IF_ACMPEQ = new BranchInstruction(0xa5); |
| 124 | + public static final BranchInstruction IF_ACMPNE = new BranchInstruction(0xa6); |
| 125 | + |
| 126 | + public static final BranchInstruction IF_ICMPEQ = new BranchInstruction(0x9f); |
| 127 | + public static final BranchInstruction IF_ICMPNE = new BranchInstruction(0xa0); |
| 128 | + |
| 129 | + public static final BranchInstruction IF_ICMPGE = new BranchInstruction(0xa2); |
| 130 | + public static final BranchInstruction IF_ICMPGT = new BranchInstruction(0xa3); |
| 131 | + public static final BranchInstruction IF_ICMPLE = new BranchInstruction(0xa4); |
| 132 | + public static final BranchInstruction IF_ICMPLT = new BranchInstruction(0xa1); |
| 133 | + |
| 134 | + public static final BranchInstruction IFEQ = new BranchInstruction(0x99); |
| 135 | + public static final BranchInstruction IFNE = new BranchInstruction(0x9a); |
| 136 | + |
| 137 | + public static final BranchInstruction IFGE = new BranchInstruction(0x9c); |
| 138 | + public static final BranchInstruction IFGT = new BranchInstruction(0x9d); |
| 139 | + public static final BranchInstruction IFLE = new BranchInstruction(0x9e); |
| 140 | + public static final BranchInstruction IFLT = new BranchInstruction(0x9b); |
| 141 | + |
| 142 | + public static final BranchInstruction IFNULL = new BranchInstruction(0xc6); |
| 143 | + public static final BranchInstruction IFNONNULL = new BranchInstruction(0xc7); |
| 144 | + |
| 145 | + // new instructions |
102 | 146 | public static final CPInstruction<ClassEntry> NEW = new CPInstruction<>(0xbb); |
103 | 147 | public static final BPInstruction NEWARRAY = new BPInstruction(0xbc); |
104 | | - public static final NoArgInstruction NOP = new NoArgInstruction(0x00); |
| 148 | + public static final CPInstruction<ClassEntry> ANEWARRAY = new CPInstruction<>(0xbd); |
| 149 | + |
| 150 | + // return instructions |
| 151 | + public static final NoArgInstruction ARETURN = new NoArgInstruction(0xb0); |
| 152 | + public static final NoArgInstruction DRETURN = new NoArgInstruction(0xaf); |
| 153 | + public static final NoArgInstruction FRETURN = new NoArgInstruction(0xae); |
| 154 | + public static final NoArgInstruction IRETURN = new NoArgInstruction(0xac); |
| 155 | + public static final NoArgInstruction LRETURN = new NoArgInstruction(0xad); |
| 156 | + public static final NoArgInstruction RETURN = new NoArgInstruction(0xb1); |
| 157 | + |
| 158 | + // stack operations |
| 159 | + public static final NoArgInstruction DUP = new NoArgInstruction(0x59); |
105 | 160 | public static final NoArgInstruction POP = new NoArgInstruction(0x57); |
106 | 161 | public static final NoArgInstruction POP2 = new NoArgInstruction(0x58); |
107 | | - public static final NoArgInstruction RETURN = new NoArgInstruction(0xb1); |
108 | 162 | public static final NoArgInstruction SWAP = new NoArgInstruction(0x5f); |
109 | 163 |
|
| 164 | + // no operation |
| 165 | + public static final NoArgInstruction NOP = new NoArgInstruction(0x00); |
| 166 | + |
110 | 167 | private JvmInstructions() { |
111 | 168 | } |
112 | 169 |
|
|
0 commit comments