CACAO
bytecode.cpp
Go to the documentation of this file.
1 /* src/vm/jit/ir/bytecode.c - Java byte code handling
2 
3  Copyright (C) 2007
4  CACAOVM - Verein zur Foerderung der freien virtuellen Maschine 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 #include "config.h"
27 
28 #include "vm/jit/ir/bytecode.hpp"
29 
30 
31 /* bytecodes ******************************************************************/
32 
34  { 1, 0, "nop" },
35  { 1, 1, "aconst_null" },
36  { 1, 1, "iconst_m1" },
37  { 1, 1, "iconst" },
38  { 1, 1, "iconst_1" },
39  { 1, 1, "iconst_2" },
40  { 1, 1, "iconst_3" },
41  { 1, 1, "iconst_4" },
42  { 1, 1, "iconst_5" },
43  { 1, 1, "lconst_0" },
44  { 1, 1, "lconst_1" },
45  { 1, 1, "fconst_0" },
46  { 1, 1, "fconst_1" },
47  { 1, 1, "fconst_2" },
48  { 1, 1, "dconst_0" },
49  { 1, 1, "dconst_1" },
50  { 2, 1, "bipush" },
51  { 3, 1, "sipush" },
52  { 2, 1, "ldc" },
53  { 3, 1, "ldc_w" },
54  { 3, 1, "ldc2_w" },
55  { 2, 1, "iload" },
56  { 2, 1, "lload" },
57  { 2, 1, "fload" },
58  { 2, 1, "dload" },
59  { 2, 1, "aload" },
60  { 1, 1, "iload_0" },
61  { 1, 1, "iload_1" },
62  { 1, 1, "iload_2" },
63  { 1, 1, "iload_3" },
64  { 1, 1, "lload_0" },
65  { 1, 1, "lload_1" },
66  { 1, 1, "lload_2" },
67  { 1, 1, "lload_3" },
68  { 1, 1, "fload_0" },
69  { 1, 1, "fload_1" },
70  { 1, 1, "fload_2" },
71  { 1, 1, "fload_3" },
72  { 1, 1, "dload_0" },
73  { 1, 1, "dload_1" },
74  { 1, 1, "dload_2" },
75  { 1, 1, "dload_3" },
76  { 1, 1, "aload_0" },
77  { 1, 1, "aload_1" },
78  { 1, 1, "aload_2" },
79  { 1, 1, "aload_3" },
80  { 1, 1, "iaload" },
81  { 1, 1, "laload" },
82  { 1, 1, "faload" },
83  { 1, 1, "daload" },
84  { 1, 1, "aaload" },
85  { 1, 1, "baload" },
86  { 1, 1, "caload" },
87  { 1, 1, "saload" },
88  { 2, 0, "istore" },
89  { 2, 0, "lstore" },
90  { 2, 0, "fstore" },
91  { 2, 0, "dstore" },
92  { 2, 0, "astore" },
93  { 1, 0, "istore_0" },
94  { 1, 0, "istore_1" },
95  { 1, 0, "istore_2" },
96  { 1, 0, "istore_3" },
97  { 1, 0, "lstore_0" },
98  { 1, 0, "lstore_1" },
99  { 1, 0, "lstore_2" },
100  { 1, 0, "lstore_3" },
101  { 1, 0, "fstore_0" },
102  { 1, 0, "fstore_1" },
103  { 1, 0, "fstore_2" },
104  { 1, 0, "fstore_3" },
105  { 1, 0, "dstore_0" },
106  { 1, 0, "dstore_1" },
107  { 1, 0, "dstore_2" },
108  { 1, 0, "dstore_3" },
109  { 1, 0, "astore_0" },
110  { 1, 0, "astore_1" },
111  { 1, 0, "astore_2" },
112  { 1, 0, "astore_3" },
113  { 1, 0, "iastore" },
114  { 1, 0, "lastore" },
115  { 1, 0, "fastore" },
116  { 1, 0, "dastore" },
117  { 1, 0, "aastore" },
118  { 1, 0, "bastore" },
119  { 1, 0, "castore" },
120  { 1, 0, "sastore" },
121  { 1, 0, "pop" },
122  { 1, 0, "pop2" },
123  { 1, 1, "dup" },
124  { 1, 1+3, "dup_x1" },
125  { 1, 2+4, "dup_x2" },
126  { 1, 2, "dup2" },
127  { 1, 2+5, "dup2_x1" },
128  { 1, 3+6, "dup2_x2" },
129  { 1, 1+2, "swap" },
130  { 1, 1, "iadd" },
131  { 1, 1, "ladd" },
132  { 1, 1, "fadd" },
133  { 1, 1, "dadd" },
134  { 1, 1, "isub" },
135  { 1, 1, "lsub" },
136  { 1, 1, "fsub" },
137  { 1, 1, "dsub" },
138  { 1, 1, "imul" },
139  { 1, 1, "lmul" },
140  { 1, 1, "fmul" },
141  { 1, 1, "dmul" },
142  { 1, 1, "idiv" },
143  { 1, 1, "ldiv" },
144  { 1, 1, "fdiv" },
145  { 1, 1, "ddiv" },
146  { 1, 1, "irem" },
147  { 1, 1, "lrem" },
148  { 1, 1, "frem" },
149  { 1, 1, "drem" },
150  { 1, 1, "ineg" },
151  { 1, 1, "lneg" },
152  { 1, 1, "fneg" },
153  { 1, 1, "dneg" },
154  { 1, 1, "ishl" },
155  { 1, 1, "lshl" },
156  { 1, 1, "ishr" },
157  { 1, 1, "lshr" },
158  { 1, 1, "iushr" },
159  { 1, 1, "lushr" },
160  { 1, 1, "iand" },
161  { 1, 1, "land" },
162  { 1, 1, "ior" },
163  { 1, 1, "lor" },
164  { 1, 1, "ixor" },
165  { 1, 1, "lxor" },
166  { 3, 0, "iinc" },
167  { 1, 1, "i2l" },
168  { 1, 1, "i2f" },
169  { 1, 1, "i2d" },
170  { 1, 1, "l2i" },
171  { 1, 1, "l2f" },
172  { 1, 1, "l2d" },
173  { 1, 1, "f2i" },
174  { 1, 1, "f2l" },
175  { 1, 1, "f2d" },
176  { 1, 1, "d2i" },
177  { 1, 1, "d2l" },
178  { 1, 1, "d2f" },
179  { 1, 1, "int2byte" },
180  { 1, 1, "int2char" },
181  { 1, 1, "int2short" },
182  { 1, 1, "lcmp" },
183  { 1, 1, "fcmpl" },
184  { 1, 1, "fcmpg" },
185  { 1, 1, "dcmpl" },
186  { 1, 1, "dcmpg" },
187  { 3, 0, "ifeq" },
188  { 3, 0, "ifne" },
189  { 3, 0, "iflt" },
190  { 3, 0, "ifge" },
191  { 3, 0, "ifgt" },
192  { 3, 0, "ifle" },
193  { 3, 0, "if_icmpe" },
194  { 3, 0, "if_icmpne" },
195  { 3, 0, "if_icmplt" },
196  { 3, 0, "if_icmpge" },
197  { 3, 0, "if_icmpgt" },
198  { 3, 0, "if_icmple" },
199  { 3, 0, "if_acmpeq" },
200  { 3, 0, "if_acmpne" },
201  { 3, 0, "goto" },
202  { 3, 1, "jsr" },
203  { 2, 0, "ret" },
204  { 0, 0, "tableswitch" },
205  { 0, 0, "lookupswitch" },
206  { 1, 0, "ireturn" },
207  { 1, 0, "lreturn" },
208  { 1, 0, "freturn" },
209  { 1, 0, "dreturn" },
210  { 1, 0, "areturn" },
211  { 1, 0, "return" },
212  { 3, 1, "getstatic" },
213  { 3, 0, "putstatic" },
214  { 3, 1, "getfield" },
215  { 3, 0, "putfield" },
216  { 3, 1, "invokevirtual" },
217  { 3, 1, "invokespecial" },
218  { 3, 1, "invokestatic" },
219  { 5, 1, "invokeinterface" },
220  { 1, 1, "undef186" }, /* XXX */
221  { 3, 1, "new" },
222  { 2, 1, "newarray" },
223  { 3, 1, "anewarray" },
224  { 1, 1, "arraylength" },
225  { 1, 1, "athrow" },
226  { 3, 1, "checkcast" },
227  { 3, 1, "instanceof" },
228  { 1, 0, "monitorenter" },
229  { 1, 0, "monitorexit" },
230  { 0, 0, "wide" },
231  { 4, 1, "multianewarray" },
232  { 3, 0, "ifnull" },
233  { 3, 0, "ifnonnull" },
234  { 5, 0, "goto_w" },
235  { 5, 1, "jsr_w" },
236  { 1, 0, "breakpoint" },
237 };
238 
239 
240 /*
241  * These are local overrides for various environment variables in Emacs.
242  * Please do not remove this and leave it at the end of the file, where
243  * Emacs will automagically detect them.
244  * ---------------------------------------------------------------------
245  * Local variables:
246  * mode: c++
247  * indent-tabs-mode: t
248  * c-basic-offset: 4
249  * tab-width: 4
250  * End:
251  * vim:noexpandtab:sw=4:ts=4:
252  */
bytecode_t bytecode[256]
Definition: bytecode.cpp:33