aboutsummaryrefslogtreecommitdiffstats
path: root/src/proguard/classfile/instruction/InstructionConstants.java
blob: 78730b33bb2fc472541437b1b50c36d80c971f04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
/*
 * ProGuard -- shrinking, optimization, obfuscation, and preverification
 *             of Java bytecode.
 *
 * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
package proguard.classfile.instruction;

/**
 * Representation of an instruction.
 *
 * @author Eric Lafortune
 */
public interface InstructionConstants
{
    public static final byte OP_NOP             = 0;
    public static final byte OP_ACONST_NULL     = 1;
    public static final byte OP_ICONST_M1       = 2;
    public static final byte OP_ICONST_0        = 3;
    public static final byte OP_ICONST_1        = 4;
    public static final byte OP_ICONST_2        = 5;
    public static final byte OP_ICONST_3        = 6;
    public static final byte OP_ICONST_4        = 7;
    public static final byte OP_ICONST_5        = 8;
    public static final byte OP_LCONST_0        = 9;
    public static final byte OP_LCONST_1        = 10;
    public static final byte OP_FCONST_0        = 11;
    public static final byte OP_FCONST_1        = 12;
    public static final byte OP_FCONST_2        = 13;
    public static final byte OP_DCONST_0        = 14;
    public static final byte OP_DCONST_1        = 15;
    public static final byte OP_BIPUSH          = 16;
    public static final byte OP_SIPUSH          = 17;
    public static final byte OP_LDC             = 18;
    public static final byte OP_LDC_W           = 19;
    public static final byte OP_LDC2_W          = 20;
    public static final byte OP_ILOAD           = 21;
    public static final byte OP_LLOAD           = 22;
    public static final byte OP_FLOAD           = 23;
    public static final byte OP_DLOAD           = 24;
    public static final byte OP_ALOAD           = 25;
    public static final byte OP_ILOAD_0         = 26;
    public static final byte OP_ILOAD_1         = 27;
    public static final byte OP_ILOAD_2         = 28;
    public static final byte OP_ILOAD_3         = 29;
    public static final byte OP_LLOAD_0         = 30;
    public static final byte OP_LLOAD_1         = 31;
    public static final byte OP_LLOAD_2         = 32;
    public static final byte OP_LLOAD_3         = 33;
    public static final byte OP_FLOAD_0         = 34;
    public static final byte OP_FLOAD_1         = 35;
    public static final byte OP_FLOAD_2         = 36;
    public static final byte OP_FLOAD_3         = 37;
    public static final byte OP_DLOAD_0         = 38;
    public static final byte OP_DLOAD_1         = 39;
    public static final byte OP_DLOAD_2         = 40;
    public static final byte OP_DLOAD_3         = 41;
    public static final byte OP_ALOAD_0         = 42;
    public static final byte OP_ALOAD_1         = 43;
    public static final byte OP_ALOAD_2         = 44;
    public static final byte OP_ALOAD_3         = 45;
    public static final byte OP_IALOAD          = 46;
    public static final byte OP_LALOAD          = 47;
    public static final byte OP_FALOAD          = 48;
    public static final byte OP_DALOAD          = 49;
    public static final byte OP_AALOAD          = 50;
    public static final byte OP_BALOAD          = 51;
    public static final byte OP_CALOAD          = 52;
    public static final byte OP_SALOAD          = 53;
    public static final byte OP_ISTORE          = 54;
    public static final byte OP_LSTORE          = 55;
    public static final byte OP_FSTORE          = 56;
    public static final byte OP_DSTORE          = 57;
    public static final byte OP_ASTORE          = 58;
    public static final byte OP_ISTORE_0        = 59;
    public static final byte OP_ISTORE_1        = 60;
    public static final byte OP_ISTORE_2        = 61;
    public static final byte OP_ISTORE_3        = 62;
    public static final byte OP_LSTORE_0        = 63;
    public static final byte OP_LSTORE_1        = 64;
    public static final byte OP_LSTORE_2        = 65;
    public static final byte OP_LSTORE_3        = 66;
    public static final byte OP_FSTORE_0        = 67;
    public static final byte OP_FSTORE_1        = 68;
    public static final byte OP_FSTORE_2        = 69;
    public static final byte OP_FSTORE_3        = 70;
    public static final byte OP_DSTORE_0        = 71;
    public static final byte OP_DSTORE_1        = 72;
    public static final byte OP_DSTORE_2        = 73;
    public static final byte OP_DSTORE_3        = 74;
    public static final byte OP_ASTORE_0        = 75;
    public static final byte OP_ASTORE_1        = 76;
    public static final byte OP_ASTORE_2        = 77;
    public static final byte OP_ASTORE_3        = 78;
    public static final byte OP_IASTORE         = 79;
    public static final byte OP_LASTORE         = 80;
    public static final byte OP_FASTORE         = 81;
    public static final byte OP_DASTORE         = 82;
    public static final byte OP_AASTORE         = 83;
    public static final byte OP_BASTORE         = 84;
    public static final byte OP_CASTORE         = 85;
    public static final byte OP_SASTORE         = 86;
    public static final byte OP_POP             = 87;
    public static final byte OP_POP2            = 88;
    public static final byte OP_DUP             = 89;
    public static final byte OP_DUP_X1          = 90;
    public static final byte OP_DUP_X2          = 91;
    public static final byte OP_DUP2            = 92;
    public static final byte OP_DUP2_X1         = 93;
    public static final byte OP_DUP2_X2         = 94;
    public static final byte OP_SWAP            = 95;
    public static final byte OP_IADD            = 96;
    public static final byte OP_LADD            = 97;
    public static final byte OP_FADD            = 98;
    public static final byte OP_DADD            = 99;
    public static final byte OP_ISUB            = 100;
    public static final byte OP_LSUB            = 101;
    public static final byte OP_FSUB            = 102;
    public static final byte OP_DSUB            = 103;
    public static final byte OP_IMUL            = 104;
    public static final byte OP_LMUL            = 105;
    public static final byte OP_FMUL            = 106;
    public static final byte OP_DMUL            = 107;
    public static final byte OP_IDIV            = 108;
    public static final byte OP_LDIV            = 109;
    public static final byte OP_FDIV            = 110;
    public static final byte OP_DDIV            = 111;
    public static final byte OP_IREM            = 112;
    public static final byte OP_LREM            = 113;
    public static final byte OP_FREM            = 114;
    public static final byte OP_DREM            = 115;
    public static final byte OP_INEG            = 116;
    public static final byte OP_LNEG            = 117;
    public static final byte OP_FNEG            = 118;
    public static final byte OP_DNEG            = 119;
    public static final byte OP_ISHL            = 120;
    public static final byte OP_LSHL            = 121;
    public static final byte OP_ISHR            = 122;
    public static final byte OP_LSHR            = 123;
    public static final byte OP_IUSHR           = 124;
    public static final byte OP_LUSHR           = 125;
    public static final byte OP_IAND            = 126;
    public static final byte OP_LAND            = 127;
    public static final byte OP_IOR             = -128;
    public static final byte OP_LOR             = -127;
    public static final byte OP_IXOR            = -126;
    public static final byte OP_LXOR            = -125;
    public static final byte OP_IINC            = -124;
    public static final byte OP_I2L             = -123;
    public static final byte OP_I2F             = -122;
    public static final byte OP_I2D             = -121;
    public static final byte OP_L2I             = -120;
    public static final byte OP_L2F             = -119;
    public static final byte OP_L2D             = -118;
    public static final byte OP_F2I             = -117;
    public static final byte OP_F2L             = -116;
    public static final byte OP_F2D             = -115;
    public static final byte OP_D2I             = -114;
    public static final byte OP_D2L             = -113;
    public static final byte OP_D2F             = -112;
    public static final byte OP_I2B             = -111;
    public static final byte OP_I2C             = -110;
    public static final byte OP_I2S             = -109;
    public static final byte OP_LCMP            = -108;
    public static final byte OP_FCMPL           = -107;
    public static final byte OP_FCMPG           = -106;
    public static final byte OP_DCMPL           = -105;
    public static final byte OP_DCMPG           = -104;
    public static final byte OP_IFEQ            = -103;
    public static final byte OP_IFNE            = -102;
    public static final byte OP_IFLT            = -101;
    public static final byte OP_IFGE            = -100;
    public static final byte OP_IFGT            = -99;
    public static final byte OP_IFLE            = -98;
    public static final byte OP_IFICMPEQ        = -97;
    public static final byte OP_IFICMPNE        = -96;
    public static final byte OP_IFICMPLT        = -95;
    public static final byte OP_IFICMPGE        = -94;
    public static final byte OP_IFICMPGT        = -93;
    public static final byte OP_IFICMPLE        = -92;
    public static final byte OP_IFACMPEQ        = -91;
    public static final byte OP_IFACMPNE        = -90;
    public static final byte OP_GOTO            = -89;
    public static final byte OP_JSR             = -88;
    public static final byte OP_RET             = -87;
    public static final byte OP_TABLESWITCH     = -86;
    public static final byte OP_LOOKUPSWITCH    = -85;
    public static final byte OP_IRETURN         = -84;
    public static final byte OP_LRETURN         = -83;
    public static final byte OP_FRETURN         = -82;
    public static final byte OP_DRETURN         = -81;
    public static final byte OP_ARETURN         = -80;
    public static final byte OP_RETURN          = -79;
    public static final byte OP_GETSTATIC       = -78;
    public static final byte OP_PUTSTATIC       = -77;
    public static final byte OP_GETFIELD        = -76;
    public static final byte OP_PUTFIELD        = -75;
    public static final byte OP_INVOKEVIRTUAL   = -74;
    public static final byte OP_INVOKESPECIAL   = -73;
    public static final byte OP_INVOKESTATIC    = -72;
    public static final byte OP_INVOKEINTERFACE = -71;
//  public static final byte OP_UNUSED           = -70;
    public static final byte OP_NEW            = -69;
    public static final byte OP_NEWARRAY       = -68;
    public static final byte OP_ANEWARRAY      = -67;
    public static final byte OP_ARRAYLENGTH    = -66;
    public static final byte OP_ATHROW         = -65;
    public static final byte OP_CHECKCAST      = -64;
    public static final byte OP_INSTANCEOF     = -63;
    public static final byte OP_MONITORENTER   = -62;
    public static final byte OP_MONITOREXIT    = -61;
    public static final byte OP_WIDE           = -60;
    public static final byte OP_MULTIANEWARRAY = -59;
    public static final byte OP_IFNULL         = -58;
    public static final byte OP_IFNONNULL      = -57;
    public static final byte OP_GOTO_W         = -56;
    public static final byte OP_JSR_W          = -55;


    public static final String[] NAMES =
    {
        "nop",
        "aconst_null",
        "iconst_m1",
        "iconst_0",
        "iconst_1",
        "iconst_2",
        "iconst_3",
        "iconst_4",
        "iconst_5",
        "lconst_0",
        "lconst_1",
        "fconst_0",
        "fconst_1",
        "fconst_2",
        "dconst_0",
        "dconst_1",
        "bipush",
        "sipush",
        "ldc",
        "ldc_w",
        "ldc2_w",
        "iload",
        "lload",
        "fload",
        "dload",
        "aload",
        "iload_0",
        "iload_1",
        "iload_2",
        "iload_3",
        "lload_0",
        "lload_1",
        "lload_2",
        "lload_3",
        "fload_0",
        "fload_1",
        "fload_2",
        "fload_3",
        "dload_0",
        "dload_1",
        "dload_2",
        "dload_3",
        "aload_0",
        "aload_1",
        "aload_2",
        "aload_3",
        "iaload",
        "laload",
        "faload",
        "daload",
        "aaload",
        "baload",
        "caload",
        "saload",
        "istore",
        "lstore",
        "fstore",
        "dstore",
        "astore",
        "istore_0",
        "istore_1",
        "istore_2",
        "istore_3",
        "lstore_0",
        "lstore_1",
        "lstore_2",
        "lstore_3",
        "fstore_0",
        "fstore_1",
        "fstore_2",
        "fstore_3",
        "dstore_0",
        "dstore_1",
        "dstore_2",
        "dstore_3",
        "astore_0",
        "astore_1",
        "astore_2",
        "astore_3",
        "iastore",
        "lastore",
        "fastore",
        "dastore",
        "aastore",
        "bastore",
        "castore",
        "sastore",
        "pop",
        "pop2",
        "dup",
        "dup_x1",
        "dup_x2",
        "dup2",
        "dup2_x1",
        "dup2_x2",
        "swap",
        "iadd",
        "ladd",
        "fadd",
        "dadd",
        "isub",
        "lsub",
        "fsub",
        "dsub",
        "imul",
        "lmul",
        "fmul",
        "dmul",
        "idiv",
        "ldiv",
        "fdiv",
        "ddiv",
        "irem",
        "lrem",
        "frem",
        "drem",
        "ineg",
        "lneg",
        "fneg",
        "dneg",
        "ishl",
        "lshl",
        "ishr",
        "lshr",
        "iushr",
        "lushr",
        "iand",
        "land",
        "ior",
        "lor",
        "ixor",
        "lxor",
        "iinc",
        "i2l",
        "i2f",
        "i2d",
        "l2i",
        "l2f",
        "l2d",
        "f2i",
        "f2l",
        "f2d",
        "d2i",
        "d2l",
        "d2f",
        "i2b",
        "i2c",
        "i2s",
        "lcmp",
        "fcmpl",
        "fcmpg",
        "dcmpl",
        "dcmpg",
        "ifeq",
        "ifne",
        "iflt",
        "ifge",
        "ifgt",
        "ifle",
        "ificmpeq",
        "ificmpne",
        "ificmplt",
        "ificmpge",
        "ificmpgt",
        "ificmple",
        "ifacmpeq",
        "ifacmpne",
        "goto",
        "jsr",
        "ret",
        "tableswitch",
        "lookupswitch",
        "ireturn",
        "lreturn",
        "freturn",
        "dreturn",
        "areturn",
        "return",
        "getstatic",
        "putstatic",
        "getfield",
        "putfield",
        "invokevirtual",
        "invokespecial",
        "invokestatic",
        "invokeinterface",
        "unused",
        "new",
        "newarray",
        "anewarray",
        "arraylength",
        "athrow",
        "checkcast",
        "instanceof",
        "monitorenter",
        "monitorexit",
        "wide",
        "multianewarray",
        "ifnull",
        "ifnonnull",
        "goto_w",
        "jsr_w",
    };


    public static final byte ARRAY_T_BOOLEAN = 4;
    public static final byte ARRAY_T_CHAR    = 5;
    public static final byte ARRAY_T_FLOAT   = 6;
    public static final byte ARRAY_T_DOUBLE  = 7;
    public static final byte ARRAY_T_BYTE    = 8;
    public static final byte ARRAY_T_SHORT   = 9;
    public static final byte ARRAY_T_INT     = 10;
    public static final byte ARRAY_T_LONG    = 11;
}