84e24f56d031bedd1124c5d39cc2dfb3230fb832
[cacao.git] / src / vm / jit / ir / bytecode.h
1 /* src/vm/jit/ir/bytecode.h - Java byte code definitions
2
3    Copyright (C) 2007 
4    CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #ifndef _VM_JIT_IR_BYTECODE_H
27 #define _VM_JIT_IR_BYTECODE_H
28
29 #include "config.h"
30
31
32 /* Java bytecodes *************************************************************/
33
34 enum {
35         BC_nop             = 0,
36
37         BC_aconst_null     = 1,
38
39         BC_iconst_m1       = 2,
40         BC_iconst_0        = 3,
41         BC_iconst_1        = 4,
42         BC_iconst_2        = 5,
43         BC_iconst_3        = 6,
44         BC_iconst_4        = 7,
45         BC_iconst_5        = 8,
46
47         BC_lconst_0        = 9,
48         BC_lconst_1        = 10,
49
50         BC_fconst_0        = 11,
51         BC_fconst_1        = 12,
52         BC_fconst_2        = 13,
53
54         BC_dconst_0        = 14,
55         BC_dconst_1        = 15,
56
57         BC_bipush          = 16,
58         BC_sipush          = 17,
59
60         BC_ldc1            = 18,
61         BC_ldc2            = 19,
62         BC_ldc2w           = 20,
63
64         BC_iload           = 21,
65         BC_lload           = 22,
66         BC_fload           = 23,
67         BC_dload           = 24,
68         BC_aload           = 25,
69
70         BC_iload_0         = 26,
71         BC_iload_1         = 27,
72         BC_iload_2         = 28,
73         BC_iload_3         = 29,
74
75         BC_lload_0         = 30,
76         BC_lload_1         = 31,
77         BC_lload_2         = 32,
78         BC_lload_3         = 33,
79
80         BC_fload_0         = 34,
81         BC_fload_1         = 35,
82         BC_fload_2         = 36,
83         BC_fload_3         = 37,
84
85         BC_dload_0         = 38,
86         BC_dload_1         = 39,
87         BC_dload_2         = 40,
88         BC_dload_3         = 41,
89
90         BC_aload_0         = 42,
91         BC_aload_1         = 43,
92         BC_aload_2         = 44,
93         BC_aload_3         = 45,
94
95         BC_iaload          = 46,
96         BC_laload          = 47,
97         BC_faload          = 48,
98         BC_daload          = 49,
99         BC_aaload          = 50,
100         BC_baload          = 51,
101         BC_caload          = 52,
102         BC_saload          = 53,
103
104         BC_istore          = 54,
105         BC_lstore          = 55,
106         BC_fstore          = 56,
107         BC_dstore          = 57,
108         BC_astore          = 58,
109
110         BC_istore_0        = 59,
111         BC_istore_1        = 60,
112         BC_istore_2        = 61,
113         BC_istore_3        = 62,
114
115         BC_lstore_0        = 63,
116         BC_lstore_1        = 64,
117         BC_lstore_2        = 65,
118         BC_lstore_3        = 66,
119
120         BC_fstore_0        = 67,
121         BC_fstore_1        = 68,
122         BC_fstore_2        = 69,
123         BC_fstore_3        = 70,
124
125         BC_dstore_0        = 71,
126         BC_dstore_1        = 72,
127         BC_dstore_2        = 73,
128         BC_dstore_3        = 74,
129
130         BC_astore_0        = 75,
131         BC_astore_1        = 76,
132         BC_astore_2        = 77,
133         BC_astore_3        = 78,
134
135         BC_iastore         = 79,
136         BC_lastore         = 80,
137         BC_fastore         = 81,
138         BC_dastore         = 82,
139         BC_aastore         = 83,
140         BC_bastore         = 84,
141         BC_castore         = 85,
142         BC_sastore         = 86,
143
144         BC_pop             = 87,
145         BC_pop2            = 88,
146         BC_dup             = 89,
147         BC_dup_x1          = 90,
148         BC_dup_x2          = 91,
149         BC_dup2            = 92,
150         BC_dup2_x1         = 93,
151         BC_dup2_x2         = 94,
152         BC_swap            = 95,
153
154         BC_iadd            = 96,
155         BC_ladd            = 97,
156         BC_fadd            = 98,
157         BC_dadd            = 99,
158
159         BC_isub            = 100,
160         BC_lsub            = 101,
161         BC_fsub            = 102,
162         BC_dsub            = 103,
163
164         BC_imul            = 104,
165         BC_lmul            = 105,
166         BC_fmul            = 106,
167         BC_dmul            = 107,
168
169         BC_idiv            = 108,
170         BC_ldiv            = 109,
171         BC_fdiv            = 110,
172         BC_ddiv            = 111,
173
174         BC_irem            = 112,
175         BC_lrem            = 113,
176         BC_frem            = 114,
177         BC_drem            = 115,
178
179         BC_ineg            = 116,
180         BC_lneg            = 117,
181         BC_fneg            = 118,
182         BC_dneg            = 119,
183
184         BC_ishl            = 120,
185         BC_lshl            = 121,
186         BC_ishr            = 122,
187         BC_lshr            = 123,
188         BC_iushr           = 124,
189         BC_lushr           = 125,
190
191         BC_iand            = 126,
192         BC_land            = 127,
193         BC_ior             = 128,
194         BC_lor             = 129,
195         BC_ixor            = 130,
196         BC_lxor            = 131,
197
198         BC_iinc            = 132,
199
200         BC_i2l             = 133,
201         BC_i2f             = 134,
202         BC_i2d             = 135,
203         BC_l2i             = 136,
204         BC_l2f             = 137,
205         BC_l2d             = 138,
206         BC_f2i             = 139,
207         BC_f2l             = 140,
208         BC_f2d             = 141,
209         BC_d2i             = 142,
210         BC_d2l             = 143,
211         BC_d2f             = 144,
212
213         BC_int2byte        = 145,
214         BC_int2char        = 146,
215         BC_int2short       = 147,
216
217         BC_lcmp            = 148,
218         BC_fcmpl           = 149,
219         BC_fcmpg           = 150,
220         BC_dcmpl           = 151,
221         BC_dcmpg           = 152,
222
223         BC_ifeq            = 153,
224         BC_ifne            = 154,
225         BC_iflt            = 155,
226         BC_ifge            = 156,
227         BC_ifgt            = 157,
228         BC_ifle            = 158,
229
230         BC_if_icmpeq       = 159,
231         BC_if_icmpne       = 160,
232         BC_if_icmplt       = 161,
233         BC_if_icmpge       = 162,
234         BC_if_icmpgt       = 163,
235         BC_if_icmple       = 164,
236         BC_if_acmpeq       = 165,
237         BC_if_acmpne       = 166,
238
239         BC_goto            = 167,
240         BC_jsr             = 168,
241         BC_ret             = 169,
242
243         BC_tableswitch     = 170,
244         BC_lookupswitch    = 171,
245
246         BC_ireturn         = 172,
247         BC_lreturn         = 173,
248         BC_freturn         = 174,
249         BC_dreturn         = 175,
250         BC_areturn         = 176,
251         BC_return          = 177,
252
253         BC_getstatic       = 178,
254         BC_putstatic       = 179,
255         BC_getfield        = 180,
256         BC_putfield        = 181,
257
258         BC_invokevirtual   = 182,
259         BC_invokespecial   = 183,
260         BC_invokestatic    = 184,
261         BC_invokeinterface = 185,
262
263         /* xxxunusedxxx 186 */
264
265         BC_new             = 187,
266         BC_newarray        = 188,
267         BC_anewarray       = 189,
268
269         BC_arraylength     = 190,
270
271         BC_athrow          = 191,
272
273         BC_checkcast       = 192,
274         BC_instanceof      = 193,
275
276         BC_monitorenter    = 194,
277         BC_monitorexit     = 195,
278
279         BC_wide            = 196,
280
281         BC_multianewarray  = 197,
282
283         BC_ifnull          = 198,
284         BC_ifnonnull       = 199,
285
286         BC_goto_w          = 200,
287         BC_jsr_w           = 201,
288
289         /* Reserved opcodes. */
290
291         BC_breakpoint      = 202,
292
293         BC_impdep1         = 254,
294         BC_impdep2         = 255
295 };
296
297 #endif /* _VM_JIT_IR_BYTECODE_H */
298
299
300 /*
301  * These are local overrides for various environment variables in Emacs.
302  * Please do not remove this and leave it at the end of the file, where
303  * Emacs will automagically detect them.
304  * ---------------------------------------------------------------------
305  * Local variables:
306  * mode: c
307  * indent-tabs-mode: t
308  * c-basic-offset: 4
309  * tab-width: 4
310  * End:
311  * vim:noexpandtab:sw=4:ts=4:
312  */