KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > alt > jiapi > reflect > instruction > Opcodes


1 /*
2  * Copyright(C) 2001 Mika Riekkinen, Joni Suominen
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or(at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package alt.jiapi.reflect.instruction;
20
21 /**
22  * This interface holds all of the opcodes and their mnemonics specified in
23  * Java Virtual Machine Specification, 2nd edition, chapter 9.
24  * Chapter 6 of the same specification describes each instruction in detail.
25  *
26  * @author Mika Riekkinen
27  * @author Joni Suominen
28  * @version $Revision: 1.3 $ $Date: 2004/02/22 16:13:37 $
29  */

30 public interface Opcodes {
31     public static final byte NOP = (byte)0; //(0x00)
32
public static final byte ACONST_NULL = (byte)1; //(0x01)
33
public static final byte ICONST_M1 = (byte)2; //(0x02)
34
public static final byte ICONST_0 = (byte)3; //(0x03)
35
public static final byte ICONST_1 = (byte)4; //(0x04)
36
public static final byte ICONST_2 = (byte)5; //(0x05)
37
public static final byte ICONST_3 = (byte)6; //(0x06)
38
public static final byte ICONST_4 = (byte)7; //(0x07)
39
public static final byte ICONST_5 = (byte)8; //(0x08)
40
public static final byte LCONST_0 = (byte)9; //(0x09)
41
public static final byte LCONST_1 = (byte)10; //(0x0a)
42
public static final byte FCONST_0 = (byte)11; //(0x0b)
43
public static final byte FCONST_1 = (byte)12; //(0x0c)
44
public static final byte FCONST_2 = (byte)13; //(0x0d)
45
public static final byte DCONST_0 = (byte)14; //(0x0e)
46
public static final byte DCONST_1 = (byte)15; //(0x0f)
47
public static final byte BIPUSH = (byte)16; //(0x10)
48
public static final byte SIPUSH = (byte)17; //(0x11)
49
public static final byte LDC = (byte)18; //(0x12)
50
public static final byte LDC_W = (byte)19; //(0x13)
51
public static final byte LDC2_W = (byte)20; //(0x14)
52
public static final byte ILOAD = (byte)21; //(0x15)
53
public static final byte LLOAD = (byte)22; //(0x16)
54
public static final byte FLOAD = (byte)23; //(0x17)
55
public static final byte DLOAD = (byte)24; //(0x18)
56
public static final byte ALOAD = (byte)25; //(0x19)
57
public static final byte ILOAD_0 = (byte)26; //(0x1a)
58
public static final byte ILOAD_1 = (byte)27; //(0x1b)
59
public static final byte ILOAD_2 = (byte)28; //(0x1c)
60
public static final byte ILOAD_3 = (byte)29; //(0x1d)
61
public static final byte LLOAD_0 = (byte)30; //(0x1e)
62
public static final byte LLOAD_1 = (byte)31; //(0x1f)
63
public static final byte LLOAD_2 = (byte)32; //(0x20)
64
public static final byte LLOAD_3 = (byte)33; //(0x21)
65
public static final byte FLOAD_0 = (byte)34; //(0x22)
66
public static final byte FLOAD_1 = (byte)35; //(0x23)
67
public static final byte FLOAD_2 = (byte)36; //(0x24)
68
public static final byte FLOAD_3 = (byte)37; //(0x25)
69
public static final byte DLOAD_0 = (byte)38; //(0x26)
70
public static final byte DLOAD_1 = (byte)39; //(0x27)
71
public static final byte DLOAD_2 = (byte)40; //(0x28)
72
public static final byte DLOAD_3 = (byte)41; //(0x29)
73
public static final byte ALOAD_0 = (byte)42; //(0x2a)
74
public static final byte ALOAD_1 = (byte)43; //(0x2b)
75
public static final byte ALOAD_2 = (byte)44; //(0x2c)
76
public static final byte ALOAD_3 = (byte)45; //(0x2d)
77
public static final byte IALOAD = (byte)46; //(0x2e)
78
public static final byte LALOAD = (byte)47; //(0x2f)
79
public static final byte FALOAD = (byte)48; //(0x30)
80
public static final byte DALOAD = (byte)49; //(0x31)
81
public static final byte AALOAD = (byte)50; //(0x32)
82
public static final byte BALOAD = (byte)51; //(0x33)
83
public static final byte CALOAD = (byte)52; //(0x34)
84
public static final byte SALOAD = (byte)53; //(0x35)
85
public static final byte ISTORE = (byte)54; //(0x36)
86
public static final byte LSTORE = (byte)55; //(0x37)
87
public static final byte FSTORE = (byte)56; //(0x38)
88
public static final byte DSTORE = (byte)57; //(0x39)
89
public static final byte ASTORE = (byte)58; //(0x3a)
90
public static final byte ISTORE_0 = (byte)59; //(0x3b)
91
public static final byte ISTORE_1 = (byte)60; //(0x3c)
92
public static final byte ISTORE_2 = (byte)61; //(0x3d)
93
public static final byte ISTORE_3 = (byte)62; //(0x3e)
94
public static final byte LSTORE_0 = (byte)63; //(0x3f)
95
public static final byte LSTORE_1 = (byte)64; //(0x40)
96
public static final byte LSTORE_2 = (byte)65; //(0x41)
97
public static final byte LSTORE_3 = (byte)66; //(0x42)
98
public static final byte FSTORE_0 = (byte)67; //(0x43)
99
public static final byte FSTORE_1 = (byte)68; //(0x44)
100
public static final byte FSTORE_2 = (byte)69; //(0x45)
101
public static final byte FSTORE_3 = (byte)70; //(0x46)
102
public static final byte DSTORE_0 = (byte)71; //(0x47)
103
public static final byte DSTORE_1 = (byte)72; //(0x48)
104
public static final byte DSTORE_2 = (byte)73; //(0x49)
105
public static final byte DSTORE_3 = (byte)74; //(0x4a)
106
public static final byte ASTORE_0 = (byte)75; //(0x4b)
107
public static final byte ASTORE_1 = (byte)76; //(0x4c)
108
public static final byte ASTORE_2 = (byte)77; //(0x4d)
109
public static final byte ASTORE_3 = (byte)78; //(0x4e)
110
public static final byte IASTORE = (byte)79; //(0x4f)
111
public static final byte LASTORE = (byte)80; //(0x50)
112
public static final byte FASTORE = (byte)81; //(0x51)
113
public static final byte DASTORE = (byte)82; //(0x52)
114
public static final byte AASTORE = (byte)83; //(0x53)
115
public static final byte BASTORE = (byte)84; //(0x54)
116
public static final byte CASTORE = (byte)85; //(0x55)
117
public static final byte SASTORE = (byte)86; //(0x56)
118
public static final byte POP = (byte)87; //(0x57)
119
public static final byte POP2 = (byte)88; //(0x58)
120
public static final byte DUP = (byte)89; //(0x59)
121
public static final byte DUP_X1 = (byte)90; //(0x5a)
122
public static final byte DUP_X2 = (byte)91; //(0x5b)
123
public static final byte DUP2 = (byte)92; //(0x5c)
124
public static final byte DUP2_X1 = (byte)93; //(0x5d)
125
public static final byte DUP2_X2 = (byte)94; //(0x5e)
126
public static final byte SWAP = (byte)95; //(0x5f)
127
public static final byte IADD = (byte)96; //(0x60)
128
public static final byte LADD = (byte)97; //(0x61)
129
public static final byte FADD = (byte)98; //(0x62)
130
public static final byte DADD = (byte)99; //(0x63)
131
public static final byte ISUB = (byte)100; //(0x64)
132
public static final byte LSUB = (byte)101; //(0x65)
133
public static final byte FSUB = (byte)102; //(0x66)
134
public static final byte DSUB = (byte)103; //(0x67)
135
public static final byte IMUL = (byte)104; //(0x68)
136
public static final byte LMUL = (byte)105; //(0x69)
137
public static final byte FMUL = (byte)106; //(0x6a)
138
public static final byte DMUL = (byte)107; //(0x6b)
139
public static final byte IDIV = (byte)108; //(0x6c)
140
public static final byte LDIV = (byte)109; //(0x6d)
141
public static final byte FDIV = (byte)110; //(0x6e)
142
public static final byte DDIV = (byte)111; //(0x6f)
143
public static final byte IREM = (byte)112; //(0x70)
144
public static final byte LREM = (byte)113; //(0x71)
145
public static final byte FREM = (byte)114; //(0x72)
146
public static final byte DREM = (byte)115; //(0x73)
147
public static final byte INEG = (byte)116; //(0x74)
148
public static final byte LNEG = (byte)117; //(0x75)
149
public static final byte FNEG = (byte)118; //(0x76)
150
public static final byte DNEG = (byte)119; //(0x77)
151
public static final byte ISHL = (byte)120; //(0x78)
152
public static final byte LSHL = (byte)121; //(0x79)
153
public static final byte ISHR = (byte)122; //(0x7a)
154
public static final byte LSHR = (byte)123; //(0x7b)
155
public static final byte IUSHR = (byte)124; //(0x7c)
156
public static final byte LUSHR = (byte)125; //(0x7d)
157
public static final byte IAND = (byte)126; //(0x7e)
158
public static final byte LAND = (byte)127; //(0x7f)
159
public static final byte IOR = (byte)128; //(0x80)
160
public static final byte LOR = (byte)129; //(0x81)
161
public static final byte IXOR = (byte)130; //(0x82)
162
public static final byte LXOR = (byte)131; //(0x83)
163
public static final byte IINC = (byte)132; //(0x84)
164
public static final byte I2L = (byte)133; //(0x85)
165
public static final byte I2F = (byte)134; //(0x86)
166
public static final byte I2D = (byte)135; //(0x87)
167
public static final byte L2I = (byte)136; //(0x88)
168
public static final byte L2F = (byte)137; //(0x89)
169
public static final byte L2D = (byte)138; //(0x8a)
170
public static final byte F2I = (byte)139; //(0x8b)
171
public static final byte F2L = (byte)140; //(0x8c)
172
public static final byte F2D = (byte)141; //(0x8d)
173
public static final byte D2I = (byte)142; //(0x8e)
174
public static final byte D2L = (byte)143; //(0x8f)
175
public static final byte D2F = (byte)144; //(0x90)
176
public static final byte I2B = (byte)145; //(0x91)
177
public static final byte I2C = (byte)146; //(0x92)
178
public static final byte I2S = (byte)147; //(0x93)
179
public static final byte LCMP = (byte)148; //(0x94)
180
public static final byte FCMPL = (byte)149; //(0x95)
181
public static final byte FCMPG = (byte)150; //(0x96)
182
public static final byte DCMPL = (byte)151; //(0x97)
183
public static final byte DCMPG = (byte)152; //(0x98)
184
public static final byte IFEQ = (byte)153; //(0x99)
185
public static final byte IFNE = (byte)154; //(0x9a)
186
public static final byte IFLT = (byte)155; //(0x9b)
187
public static final byte IFGE = (byte)156; //(0x9c)
188
public static final byte IFGT = (byte)157; //(0x9d)
189
public static final byte IFLE = (byte)158; //(0x9e)
190
public static final byte IF_ICMPEQ = (byte)159; //(0x9f)
191
public static final byte IF_ICMPNE = (byte)160; //(0xa0)
192
public static final byte IF_ICMPLT = (byte)161; //(0xa1)
193
public static final byte IF_ICMPGE = (byte)162; //(0xa2)
194
public static final byte IF_ICMPGT = (byte)163; //(0xa3)
195
public static final byte IF_ICMPLE = (byte)164; //(0xa4)
196
public static final byte IF_ACMPEQ = (byte)165; //(0xa5)
197
public static final byte IF_ACMPNE = (byte)166; //(0xa6)
198
public static final byte GOTO = (byte)167; //(0xa7)
199
public static final byte JSR = (byte)168; //(0xa8)
200
public static final byte RET = (byte)169; //(0xa9)
201
public static final byte TABLESWITCH = (byte)170; //(0xaa)
202
public static final byte LOOKUPSWITCH = (byte)171; //(0xab)
203
public static final byte IRETURN = (byte)172; //(0xac)
204
public static final byte LRETURN = (byte)173; //(0xad)
205
public static final byte FRETURN = (byte)174; //(0xae)
206
public static final byte DRETURN = (byte)175; //(0xaf)
207
public static final byte ARETURN = (byte)176; //(0xb0)
208
public static final byte RETURN = (byte)177; //(0xb1)
209
public static final byte GETSTATIC = (byte)178; //(0xb2)
210
public static final byte PUTSTATIC = (byte)179; //(0xb3)
211
public static final byte GETFIELD = (byte)180; //(0xb4)
212
public static final byte PUTFIELD = (byte)181; //(0xb5)
213
public static final byte INVOKEVIRTUAL = (byte)182; //(0xb6)
214
public static final byte INVOKESPECIAL = (byte)183; //(0xb7)
215
public static final byte INVOKESTATIC = (byte)184; //(0xb8)
216
public static final byte INVOKEINTERFACE = (byte)185; //(0xb9)
217
public static final byte XXXUNUSEDXXX = (byte)186; //(0xba)
218
public static final byte NEW = (byte)187; //(0xbb)
219
public static final byte NEWARRAY = (byte)188; //(0xbc)
220
public static final byte ANEWARRAY = (byte)189; //(0xbd)
221
public static final byte ARRAYLENGTH = (byte)190; //(0xbe)
222
public static final byte ATHROW = (byte)191; //(0xbf)
223
public static final byte CHECKCAST = (byte)192; //(0xc0)
224
public static final byte INSTANCEOF = (byte)193; //(0xc1)
225
public static final byte MONITORENTER = (byte)194; //(0xc2)
226
public static final byte MONITOREXIT = (byte)195; //(0xc3)
227
public static final byte WIDE = (byte)196; //(0xc4)
228
public static final byte MULTIANEWARRAY = (byte)197; //(0xc5)
229
public static final byte IFNULL = (byte)198; //(0xc6)
230
public static final byte IFNONNULL = (byte)199; //(0xc7)
231
public static final byte GOTO_W = (byte)200; //(0xc8)
232
public static final byte JSR_W = (byte)201; //(0xc9)
233
public static final byte BREAKPOINT = (byte)202; //(0xca)
234
public static final byte IMPDEP1 = (byte)254; //(0xfe)
235
public static final byte IMPDEP2 = (byte)255; //(0xff)
236

237
238
239
240     public static final String JavaDoc[] opcodeStrings = new String JavaDoc[] {
241     "nop",
242     "aconst_null",
243     "iconst_m1",
244     "iconst_0",
245     "iconst_1",
246     "iconst_2",
247     "iconst_3",
248     "iconst_4",
249     "iconst_5",
250     "lconst_0",
251     "lconst_1",
252     "fconst_0",
253     "fconst_1",
254     "fconst_2",
255     "dconst_0",
256     "dconst_1",
257     "bipush",
258     "sipush",
259     "ldc",
260     "ldc_w",
261     "ldc2_w",
262     "iload",
263     "lload",
264     "fload",
265     "dload",
266     "aload",
267     "iload_0",
268     "iload_1",
269     "iload_2",
270     "iload_3",
271     "lload_0",
272     "lload_1",
273     "lload_2",
274     "lload_3",
275     "fload_0",
276     "fload_1",
277     "fload_2",
278     "fload_3",
279     "dload_0",
280     "dload_1",
281     "dload_2",
282     "dload_3",
283     "aload_0",
284     "aload_1",
285     "aload_2",
286     "aload_3",
287     "iaload",
288     "laload",
289     "faload",
290     "daload",
291     "aaload",
292     "baload",
293     "caload",
294     "saload",
295     "istore",
296     "lstore",
297     "fstore",
298     "dstore",
299     "astore",
300     "istore_0",
301     "istore_1",
302     "istore_2",
303     "istore_3",
304     "lstore_0",
305     "lstore_1",
306     "lstore_2",
307     "lstore_3",
308     "fstore_0",
309     "fstore_1",
310     "fstore_2",
311     "fstore_3",
312     "dstore_0",
313     "dstore_1",
314     "dstore_2",
315     "dstore_3",
316     "astore_0",
317     "astore_1",
318     "astore_2",
319     "astore_3",
320     "iastore",
321     "lastore",
322     "fastore",
323     "dastore",
324     "aastore",
325     "bastore",
326     "castore",
327     "sastore",
328     "pop",
329     "pop2",
330     "dup",
331     "dup_x1",
332     "dup_x2",
333     "dup2",
334     "dup2_x1",
335     "dup2_x2",
336     "swap",
337     "iadd",
338     "ladd",
339     "fadd",
340     "dadd",
341     "isub",
342     "lsub",
343     "fsub",
344     "dsub",
345     "imul",
346     "lmul",
347     "fmul",
348     "dmul",
349     "idiv",
350     "ldiv",
351     "fdiv",
352     "ddiv",
353     "irem",
354     "lrem",
355     "frem",
356     "drem",
357     "ineg",
358     "lneg",
359     "fneg",
360     "dneg",
361     "ishl",
362     "lshl",
363     "ishr",
364     "lshr",
365     "iushr",
366     "lushr",
367     "iand",
368     "land",
369     "ior",
370     "lor",
371     "ixor",
372     "lxor",
373     "iinc",
374     "i2l",
375     "i2f",
376     "i2d",
377     "l2i",
378     "l2f",
379     "l2d",
380     "f2i",
381     "f2l",
382     "f2d",
383     "d2i",
384     "d2l",
385     "d2f",
386     "i2b",
387     "i2c",
388     "i2s",
389     "lcmp",
390     "fcmpl",
391     "fcmpg",
392     "dcmpl",
393     "dcmpg",
394     "ifeq",
395     "ifne",
396     "iflt",
397     "ifge",
398     "ifgt",
399     "ifle",
400     "if_icmpeq",
401     "if_icmpne",
402     "if_icmplt",
403     "if_icmpge",
404     "if_icmpgt",
405     "if_icmple",
406     "if_acmpeq",
407     "if_acmpne",
408     "goto",
409     "jsr",
410     "ret",
411     "tableswitch",
412     "lookupswitch",
413     "ireturn",
414     "lreturn",
415     "freturn",
416     "dreturn",
417     "areturn",
418     "return",
419     "getstatic",
420     "putstatic",
421     "getfield",
422     "putfield",
423     "invokevirtual",
424     "invokespecial",
425     "invokestatic",
426     "invokeinterface",
427     "xxxunusedxxx",
428     "new",
429     "newarray",
430     "anewarray",
431     "arraylength",
432     "athrow",
433     "checkcast",
434     "instanceof",
435     "monitorenter",
436     "monitorexit",
437     "wide",
438     "multianewarray",
439     "ifnull",
440     "ifnonnull",
441     "goto_w",
442     "jsr_w",
443     "breakpoint",
444     "impdep1",
445     "impdep2"
446     };
447 }
448
Popular Tags