Mercurial > hg > graal-compiler
annotate src/share/vm/interpreter/templateTable.cpp @ 1782:f353275af40e
6981773: incorrect fill value with OptimizeFill
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Thu, 02 Sep 2010 11:40:02 -0700 |
parents | 136b78722a08 |
children | 2d26b0046e0d f95d63e2154a |
rev | line source |
---|---|
0 | 1 /* |
1579 | 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 #include "incls/_precompiled.incl" | |
26 #include "incls/_templateTable.cpp.incl" | |
27 | |
28 | |
29 #ifdef CC_INTERP | |
30 | |
31 void templateTable_init() { | |
32 } | |
33 | |
34 #else | |
35 | |
36 //---------------------------------------------------------------------------------------------------- | |
37 // Implementation of Template | |
38 | |
39 | |
40 void Template::initialize(int flags, TosState tos_in, TosState tos_out, generator gen, int arg) { | |
41 _flags = flags; | |
42 _tos_in = tos_in; | |
43 _tos_out = tos_out; | |
44 _gen = gen; | |
45 _arg = arg; | |
46 } | |
47 | |
48 | |
49 Bytecodes::Code Template::bytecode() const { | |
50 int i = this - TemplateTable::_template_table; | |
51 if (i < 0 || i >= Bytecodes::number_of_codes) i = this - TemplateTable::_template_table_wide; | |
52 return Bytecodes::cast(i); | |
53 } | |
54 | |
55 | |
56 void Template::generate(InterpreterMacroAssembler* masm) { | |
57 // parameter passing | |
58 TemplateTable::_desc = this; | |
59 TemplateTable::_masm = masm; | |
60 // code generation | |
61 _gen(_arg); | |
62 masm->flush(); | |
63 } | |
64 | |
65 | |
66 //---------------------------------------------------------------------------------------------------- | |
67 // Implementation of TemplateTable: Platform-independent helper routines | |
68 | |
69 void TemplateTable::call_VM(Register oop_result, address entry_point) { | |
70 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
71 _masm->call_VM(oop_result, entry_point); | |
72 } | |
73 | |
74 | |
75 void TemplateTable::call_VM(Register oop_result, address entry_point, Register arg_1) { | |
76 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
77 _masm->call_VM(oop_result, entry_point, arg_1); | |
78 } | |
79 | |
80 | |
81 void TemplateTable::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2) { | |
82 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
83 _masm->call_VM(oop_result, entry_point, arg_1, arg_2); | |
84 } | |
85 | |
86 | |
87 void TemplateTable::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3) { | |
88 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
89 _masm->call_VM(oop_result, entry_point, arg_1, arg_2, arg_3); | |
90 } | |
91 | |
92 | |
93 void TemplateTable::call_VM(Register oop_result, Register last_java_sp, address entry_point) { | |
94 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
95 _masm->call_VM(oop_result, last_java_sp, entry_point); | |
96 } | |
97 | |
98 | |
99 void TemplateTable::call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1) { | |
100 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
101 _masm->call_VM(oop_result, last_java_sp, entry_point, arg_1); | |
102 } | |
103 | |
104 | |
105 void TemplateTable::call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2) { | |
106 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
107 _masm->call_VM(oop_result, last_java_sp, entry_point, arg_1, arg_2); | |
108 } | |
109 | |
110 | |
111 void TemplateTable::call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1, Register arg_2, Register arg_3) { | |
112 assert(_desc->calls_vm(), "inconsistent calls_vm information"); | |
113 _masm->call_VM(oop_result, last_java_sp, entry_point, arg_1, arg_2, arg_3); | |
114 } | |
115 | |
116 | |
117 //---------------------------------------------------------------------------------------------------- | |
118 // Implementation of TemplateTable: Platform-independent bytecodes | |
119 | |
120 void TemplateTable::float_cmp(int unordered_result) { | |
121 transition(ftos, itos); | |
122 float_cmp(true, unordered_result); | |
123 } | |
124 | |
125 | |
126 void TemplateTable::double_cmp(int unordered_result) { | |
127 transition(dtos, itos); | |
128 float_cmp(false, unordered_result); | |
129 } | |
130 | |
131 | |
132 void TemplateTable::_goto() { | |
133 transition(vtos, vtos); | |
134 branch(false, false); | |
135 } | |
136 | |
137 | |
138 void TemplateTable::goto_w() { | |
139 transition(vtos, vtos); | |
140 branch(false, true); | |
141 } | |
142 | |
143 | |
144 void TemplateTable::jsr_w() { | |
145 transition(vtos, vtos); // result is not an oop, so do not transition to atos | |
146 branch(true, true); | |
147 } | |
148 | |
149 | |
150 void TemplateTable::jsr() { | |
151 transition(vtos, vtos); // result is not an oop, so do not transition to atos | |
152 branch(true, false); | |
153 } | |
154 | |
155 | |
156 | |
157 //---------------------------------------------------------------------------------------------------- | |
158 // Implementation of TemplateTable: Debugging | |
159 | |
160 void TemplateTable::transition(TosState tos_in, TosState tos_out) { | |
161 assert(_desc->tos_in() == tos_in , "inconsistent tos_in information"); | |
162 assert(_desc->tos_out() == tos_out, "inconsistent tos_out information"); | |
163 } | |
164 | |
165 | |
166 //---------------------------------------------------------------------------------------------------- | |
167 // Implementation of TemplateTable: Initialization | |
168 | |
169 bool TemplateTable::_is_initialized = false; | |
170 Template TemplateTable::_template_table [Bytecodes::number_of_codes]; | |
171 Template TemplateTable::_template_table_wide[Bytecodes::number_of_codes]; | |
172 | |
173 Template* TemplateTable::_desc; | |
174 InterpreterMacroAssembler* TemplateTable::_masm; | |
342 | 175 BarrierSet* TemplateTable::_bs; |
0 | 176 |
177 | |
178 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(), char filler) { | |
179 assert(filler == ' ', "just checkin'"); | |
180 def(code, flags, in, out, (Template::generator)gen, 0); | |
181 } | |
182 | |
183 | |
184 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(int arg), int arg) { | |
185 // should factor out these constants | |
186 const int ubcp = 1 << Template::uses_bcp_bit; | |
187 const int disp = 1 << Template::does_dispatch_bit; | |
188 const int clvm = 1 << Template::calls_vm_bit; | |
189 const int iswd = 1 << Template::wide_bit; | |
190 // determine which table to use | |
191 bool is_wide = (flags & iswd) != 0; | |
192 // make sure that wide instructions have a vtos entry point | |
193 // (since they are executed extremely rarely, it doesn't pay out to have an | |
194 // extra set of 5 dispatch tables for the wide instructions - for simplicity | |
195 // they all go with one table) | |
196 assert(in == vtos || !is_wide, "wide instructions have vtos entry point only"); | |
197 Template* t = is_wide ? template_for_wide(code) : template_for(code); | |
198 // setup entry | |
199 t->initialize(flags, in, out, gen, arg); | |
200 assert(t->bytecode() == code, "just checkin'"); | |
201 } | |
202 | |
203 | |
204 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(Operation op), Operation op) { | |
205 def(code, flags, in, out, (Template::generator)gen, (int)op); | |
206 } | |
207 | |
208 | |
209 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(bool arg ), bool arg) { | |
210 def(code, flags, in, out, (Template::generator)gen, (int)arg); | |
211 } | |
212 | |
213 | |
214 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(TosState tos), TosState tos) { | |
215 def(code, flags, in, out, (Template::generator)gen, (int)tos); | |
216 } | |
217 | |
218 | |
219 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(Condition cc), Condition cc) { | |
220 def(code, flags, in, out, (Template::generator)gen, (int)cc); | |
221 } | |
222 | |
223 #if defined(TEMPLATE_TABLE_BUG) | |
224 // | |
225 // It appears that gcc (version 2.91) generates bad code for the template | |
226 // table init if this macro is not defined. My symptom was an assertion | |
227 // assert(Universe::heap()->is_in(obj), "sanity check") in handles.cpp line 24. | |
228 // when called from interpreterRuntime.resolve_invoke(). | |
229 // | |
230 #define iload TemplateTable::iload | |
231 #define lload TemplateTable::lload | |
232 #define fload TemplateTable::fload | |
233 #define dload TemplateTable::dload | |
234 #define aload TemplateTable::aload | |
235 #define istore TemplateTable::istore | |
236 #define lstore TemplateTable::lstore | |
237 #define fstore TemplateTable::fstore | |
238 #define dstore TemplateTable::dstore | |
239 #define astore TemplateTable::astore | |
240 #endif // TEMPLATE_TABLE_BUG | |
241 | |
242 void TemplateTable::initialize() { | |
243 if (_is_initialized) return; | |
244 | |
245 // Initialize table | |
246 TraceTime timer("TemplateTable initialization", TraceStartupTime); | |
247 | |
342 | 248 _bs = Universe::heap()->barrier_set(); |
249 | |
0 | 250 // For better readability |
251 const char _ = ' '; | |
252 const int ____ = 0; | |
253 const int ubcp = 1 << Template::uses_bcp_bit; | |
254 const int disp = 1 << Template::does_dispatch_bit; | |
255 const int clvm = 1 << Template::calls_vm_bit; | |
256 const int iswd = 1 << Template::wide_bit; | |
257 // interpr. templates | |
258 // Java spec bytecodes ubcp|disp|clvm|iswd in out generator argument | |
259 def(Bytecodes::_nop , ____|____|____|____, vtos, vtos, nop , _ ); | |
260 def(Bytecodes::_aconst_null , ____|____|____|____, vtos, atos, aconst_null , _ ); | |
261 def(Bytecodes::_iconst_m1 , ____|____|____|____, vtos, itos, iconst , -1 ); | |
262 def(Bytecodes::_iconst_0 , ____|____|____|____, vtos, itos, iconst , 0 ); | |
263 def(Bytecodes::_iconst_1 , ____|____|____|____, vtos, itos, iconst , 1 ); | |
264 def(Bytecodes::_iconst_2 , ____|____|____|____, vtos, itos, iconst , 2 ); | |
265 def(Bytecodes::_iconst_3 , ____|____|____|____, vtos, itos, iconst , 3 ); | |
266 def(Bytecodes::_iconst_4 , ____|____|____|____, vtos, itos, iconst , 4 ); | |
267 def(Bytecodes::_iconst_5 , ____|____|____|____, vtos, itos, iconst , 5 ); | |
268 def(Bytecodes::_lconst_0 , ____|____|____|____, vtos, ltos, lconst , 0 ); | |
269 def(Bytecodes::_lconst_1 , ____|____|____|____, vtos, ltos, lconst , 1 ); | |
270 def(Bytecodes::_fconst_0 , ____|____|____|____, vtos, ftos, fconst , 0 ); | |
271 def(Bytecodes::_fconst_1 , ____|____|____|____, vtos, ftos, fconst , 1 ); | |
272 def(Bytecodes::_fconst_2 , ____|____|____|____, vtos, ftos, fconst , 2 ); | |
273 def(Bytecodes::_dconst_0 , ____|____|____|____, vtos, dtos, dconst , 0 ); | |
274 def(Bytecodes::_dconst_1 , ____|____|____|____, vtos, dtos, dconst , 1 ); | |
275 def(Bytecodes::_bipush , ubcp|____|____|____, vtos, itos, bipush , _ ); | |
276 def(Bytecodes::_sipush , ubcp|____|____|____, vtos, itos, sipush , _ ); | |
277 def(Bytecodes::_ldc , ubcp|____|clvm|____, vtos, vtos, ldc , false ); | |
278 def(Bytecodes::_ldc_w , ubcp|____|clvm|____, vtos, vtos, ldc , true ); | |
279 def(Bytecodes::_ldc2_w , ubcp|____|____|____, vtos, vtos, ldc2_w , _ ); | |
280 def(Bytecodes::_iload , ubcp|____|clvm|____, vtos, itos, iload , _ ); | |
281 def(Bytecodes::_lload , ubcp|____|____|____, vtos, ltos, lload , _ ); | |
282 def(Bytecodes::_fload , ubcp|____|____|____, vtos, ftos, fload , _ ); | |
283 def(Bytecodes::_dload , ubcp|____|____|____, vtos, dtos, dload , _ ); | |
284 def(Bytecodes::_aload , ubcp|____|clvm|____, vtos, atos, aload , _ ); | |
285 def(Bytecodes::_iload_0 , ____|____|____|____, vtos, itos, iload , 0 ); | |
286 def(Bytecodes::_iload_1 , ____|____|____|____, vtos, itos, iload , 1 ); | |
287 def(Bytecodes::_iload_2 , ____|____|____|____, vtos, itos, iload , 2 ); | |
288 def(Bytecodes::_iload_3 , ____|____|____|____, vtos, itos, iload , 3 ); | |
289 def(Bytecodes::_lload_0 , ____|____|____|____, vtos, ltos, lload , 0 ); | |
290 def(Bytecodes::_lload_1 , ____|____|____|____, vtos, ltos, lload , 1 ); | |
291 def(Bytecodes::_lload_2 , ____|____|____|____, vtos, ltos, lload , 2 ); | |
292 def(Bytecodes::_lload_3 , ____|____|____|____, vtos, ltos, lload , 3 ); | |
293 def(Bytecodes::_fload_0 , ____|____|____|____, vtos, ftos, fload , 0 ); | |
294 def(Bytecodes::_fload_1 , ____|____|____|____, vtos, ftos, fload , 1 ); | |
295 def(Bytecodes::_fload_2 , ____|____|____|____, vtos, ftos, fload , 2 ); | |
296 def(Bytecodes::_fload_3 , ____|____|____|____, vtos, ftos, fload , 3 ); | |
297 def(Bytecodes::_dload_0 , ____|____|____|____, vtos, dtos, dload , 0 ); | |
298 def(Bytecodes::_dload_1 , ____|____|____|____, vtos, dtos, dload , 1 ); | |
299 def(Bytecodes::_dload_2 , ____|____|____|____, vtos, dtos, dload , 2 ); | |
300 def(Bytecodes::_dload_3 , ____|____|____|____, vtos, dtos, dload , 3 ); | |
301 def(Bytecodes::_aload_0 , ubcp|____|clvm|____, vtos, atos, aload_0 , _ ); | |
302 def(Bytecodes::_aload_1 , ____|____|____|____, vtos, atos, aload , 1 ); | |
303 def(Bytecodes::_aload_2 , ____|____|____|____, vtos, atos, aload , 2 ); | |
304 def(Bytecodes::_aload_3 , ____|____|____|____, vtos, atos, aload , 3 ); | |
305 def(Bytecodes::_iaload , ____|____|____|____, itos, itos, iaload , _ ); | |
306 def(Bytecodes::_laload , ____|____|____|____, itos, ltos, laload , _ ); | |
307 def(Bytecodes::_faload , ____|____|____|____, itos, ftos, faload , _ ); | |
308 def(Bytecodes::_daload , ____|____|____|____, itos, dtos, daload , _ ); | |
309 def(Bytecodes::_aaload , ____|____|____|____, itos, atos, aaload , _ ); | |
310 def(Bytecodes::_baload , ____|____|____|____, itos, itos, baload , _ ); | |
311 def(Bytecodes::_caload , ____|____|____|____, itos, itos, caload , _ ); | |
312 def(Bytecodes::_saload , ____|____|____|____, itos, itos, saload , _ ); | |
313 def(Bytecodes::_istore , ubcp|____|clvm|____, itos, vtos, istore , _ ); | |
314 def(Bytecodes::_lstore , ubcp|____|____|____, ltos, vtos, lstore , _ ); | |
315 def(Bytecodes::_fstore , ubcp|____|____|____, ftos, vtos, fstore , _ ); | |
316 def(Bytecodes::_dstore , ubcp|____|____|____, dtos, vtos, dstore , _ ); | |
317 def(Bytecodes::_astore , ubcp|____|clvm|____, vtos, vtos, astore , _ ); | |
318 def(Bytecodes::_istore_0 , ____|____|____|____, itos, vtos, istore , 0 ); | |
319 def(Bytecodes::_istore_1 , ____|____|____|____, itos, vtos, istore , 1 ); | |
320 def(Bytecodes::_istore_2 , ____|____|____|____, itos, vtos, istore , 2 ); | |
321 def(Bytecodes::_istore_3 , ____|____|____|____, itos, vtos, istore , 3 ); | |
322 def(Bytecodes::_lstore_0 , ____|____|____|____, ltos, vtos, lstore , 0 ); | |
323 def(Bytecodes::_lstore_1 , ____|____|____|____, ltos, vtos, lstore , 1 ); | |
324 def(Bytecodes::_lstore_2 , ____|____|____|____, ltos, vtos, lstore , 2 ); | |
325 def(Bytecodes::_lstore_3 , ____|____|____|____, ltos, vtos, lstore , 3 ); | |
326 def(Bytecodes::_fstore_0 , ____|____|____|____, ftos, vtos, fstore , 0 ); | |
327 def(Bytecodes::_fstore_1 , ____|____|____|____, ftos, vtos, fstore , 1 ); | |
328 def(Bytecodes::_fstore_2 , ____|____|____|____, ftos, vtos, fstore , 2 ); | |
329 def(Bytecodes::_fstore_3 , ____|____|____|____, ftos, vtos, fstore , 3 ); | |
330 def(Bytecodes::_dstore_0 , ____|____|____|____, dtos, vtos, dstore , 0 ); | |
331 def(Bytecodes::_dstore_1 , ____|____|____|____, dtos, vtos, dstore , 1 ); | |
332 def(Bytecodes::_dstore_2 , ____|____|____|____, dtos, vtos, dstore , 2 ); | |
333 def(Bytecodes::_dstore_3 , ____|____|____|____, dtos, vtos, dstore , 3 ); | |
334 def(Bytecodes::_astore_0 , ____|____|____|____, vtos, vtos, astore , 0 ); | |
335 def(Bytecodes::_astore_1 , ____|____|____|____, vtos, vtos, astore , 1 ); | |
336 def(Bytecodes::_astore_2 , ____|____|____|____, vtos, vtos, astore , 2 ); | |
337 def(Bytecodes::_astore_3 , ____|____|____|____, vtos, vtos, astore , 3 ); | |
338 def(Bytecodes::_iastore , ____|____|____|____, itos, vtos, iastore , _ ); | |
339 def(Bytecodes::_lastore , ____|____|____|____, ltos, vtos, lastore , _ ); | |
340 def(Bytecodes::_fastore , ____|____|____|____, ftos, vtos, fastore , _ ); | |
341 def(Bytecodes::_dastore , ____|____|____|____, dtos, vtos, dastore , _ ); | |
342 def(Bytecodes::_aastore , ____|____|clvm|____, vtos, vtos, aastore , _ ); | |
343 def(Bytecodes::_bastore , ____|____|____|____, itos, vtos, bastore , _ ); | |
344 def(Bytecodes::_castore , ____|____|____|____, itos, vtos, castore , _ ); | |
345 def(Bytecodes::_sastore , ____|____|____|____, itos, vtos, sastore , _ ); | |
346 def(Bytecodes::_pop , ____|____|____|____, vtos, vtos, pop , _ ); | |
347 def(Bytecodes::_pop2 , ____|____|____|____, vtos, vtos, pop2 , _ ); | |
348 def(Bytecodes::_dup , ____|____|____|____, vtos, vtos, dup , _ ); | |
349 def(Bytecodes::_dup_x1 , ____|____|____|____, vtos, vtos, dup_x1 , _ ); | |
350 def(Bytecodes::_dup_x2 , ____|____|____|____, vtos, vtos, dup_x2 , _ ); | |
351 def(Bytecodes::_dup2 , ____|____|____|____, vtos, vtos, dup2 , _ ); | |
352 def(Bytecodes::_dup2_x1 , ____|____|____|____, vtos, vtos, dup2_x1 , _ ); | |
353 def(Bytecodes::_dup2_x2 , ____|____|____|____, vtos, vtos, dup2_x2 , _ ); | |
354 def(Bytecodes::_swap , ____|____|____|____, vtos, vtos, swap , _ ); | |
355 def(Bytecodes::_iadd , ____|____|____|____, itos, itos, iop2 , add ); | |
356 def(Bytecodes::_ladd , ____|____|____|____, ltos, ltos, lop2 , add ); | |
357 def(Bytecodes::_fadd , ____|____|____|____, ftos, ftos, fop2 , add ); | |
358 def(Bytecodes::_dadd , ____|____|____|____, dtos, dtos, dop2 , add ); | |
359 def(Bytecodes::_isub , ____|____|____|____, itos, itos, iop2 , sub ); | |
360 def(Bytecodes::_lsub , ____|____|____|____, ltos, ltos, lop2 , sub ); | |
361 def(Bytecodes::_fsub , ____|____|____|____, ftos, ftos, fop2 , sub ); | |
362 def(Bytecodes::_dsub , ____|____|____|____, dtos, dtos, dop2 , sub ); | |
363 def(Bytecodes::_imul , ____|____|____|____, itos, itos, iop2 , mul ); | |
364 def(Bytecodes::_lmul , ____|____|____|____, ltos, ltos, lmul , _ ); | |
365 def(Bytecodes::_fmul , ____|____|____|____, ftos, ftos, fop2 , mul ); | |
366 def(Bytecodes::_dmul , ____|____|____|____, dtos, dtos, dop2 , mul ); | |
367 def(Bytecodes::_idiv , ____|____|____|____, itos, itos, idiv , _ ); | |
368 def(Bytecodes::_ldiv , ____|____|____|____, ltos, ltos, ldiv , _ ); | |
369 def(Bytecodes::_fdiv , ____|____|____|____, ftos, ftos, fop2 , div ); | |
370 def(Bytecodes::_ddiv , ____|____|____|____, dtos, dtos, dop2 , div ); | |
371 def(Bytecodes::_irem , ____|____|____|____, itos, itos, irem , _ ); | |
372 def(Bytecodes::_lrem , ____|____|____|____, ltos, ltos, lrem , _ ); | |
373 def(Bytecodes::_frem , ____|____|____|____, ftos, ftos, fop2 , rem ); | |
374 def(Bytecodes::_drem , ____|____|____|____, dtos, dtos, dop2 , rem ); | |
375 def(Bytecodes::_ineg , ____|____|____|____, itos, itos, ineg , _ ); | |
376 def(Bytecodes::_lneg , ____|____|____|____, ltos, ltos, lneg , _ ); | |
377 def(Bytecodes::_fneg , ____|____|____|____, ftos, ftos, fneg , _ ); | |
378 def(Bytecodes::_dneg , ____|____|____|____, dtos, dtos, dneg , _ ); | |
379 def(Bytecodes::_ishl , ____|____|____|____, itos, itos, iop2 , shl ); | |
380 def(Bytecodes::_lshl , ____|____|____|____, itos, ltos, lshl , _ ); | |
381 def(Bytecodes::_ishr , ____|____|____|____, itos, itos, iop2 , shr ); | |
382 def(Bytecodes::_lshr , ____|____|____|____, itos, ltos, lshr , _ ); | |
383 def(Bytecodes::_iushr , ____|____|____|____, itos, itos, iop2 , ushr ); | |
384 def(Bytecodes::_lushr , ____|____|____|____, itos, ltos, lushr , _ ); | |
385 def(Bytecodes::_iand , ____|____|____|____, itos, itos, iop2 , _and ); | |
386 def(Bytecodes::_land , ____|____|____|____, ltos, ltos, lop2 , _and ); | |
387 def(Bytecodes::_ior , ____|____|____|____, itos, itos, iop2 , _or ); | |
388 def(Bytecodes::_lor , ____|____|____|____, ltos, ltos, lop2 , _or ); | |
389 def(Bytecodes::_ixor , ____|____|____|____, itos, itos, iop2 , _xor ); | |
390 def(Bytecodes::_lxor , ____|____|____|____, ltos, ltos, lop2 , _xor ); | |
391 def(Bytecodes::_iinc , ubcp|____|clvm|____, vtos, vtos, iinc , _ ); | |
392 def(Bytecodes::_i2l , ____|____|____|____, itos, ltos, convert , _ ); | |
393 def(Bytecodes::_i2f , ____|____|____|____, itos, ftos, convert , _ ); | |
394 def(Bytecodes::_i2d , ____|____|____|____, itos, dtos, convert , _ ); | |
395 def(Bytecodes::_l2i , ____|____|____|____, ltos, itos, convert , _ ); | |
396 def(Bytecodes::_l2f , ____|____|____|____, ltos, ftos, convert , _ ); | |
397 def(Bytecodes::_l2d , ____|____|____|____, ltos, dtos, convert , _ ); | |
398 def(Bytecodes::_f2i , ____|____|____|____, ftos, itos, convert , _ ); | |
399 def(Bytecodes::_f2l , ____|____|____|____, ftos, ltos, convert , _ ); | |
400 def(Bytecodes::_f2d , ____|____|____|____, ftos, dtos, convert , _ ); | |
401 def(Bytecodes::_d2i , ____|____|____|____, dtos, itos, convert , _ ); | |
402 def(Bytecodes::_d2l , ____|____|____|____, dtos, ltos, convert , _ ); | |
403 def(Bytecodes::_d2f , ____|____|____|____, dtos, ftos, convert , _ ); | |
404 def(Bytecodes::_i2b , ____|____|____|____, itos, itos, convert , _ ); | |
405 def(Bytecodes::_i2c , ____|____|____|____, itos, itos, convert , _ ); | |
406 def(Bytecodes::_i2s , ____|____|____|____, itos, itos, convert , _ ); | |
407 def(Bytecodes::_lcmp , ____|____|____|____, ltos, itos, lcmp , _ ); | |
408 def(Bytecodes::_fcmpl , ____|____|____|____, ftos, itos, float_cmp , -1 ); | |
409 def(Bytecodes::_fcmpg , ____|____|____|____, ftos, itos, float_cmp , 1 ); | |
410 def(Bytecodes::_dcmpl , ____|____|____|____, dtos, itos, double_cmp , -1 ); | |
411 def(Bytecodes::_dcmpg , ____|____|____|____, dtos, itos, double_cmp , 1 ); | |
412 def(Bytecodes::_ifeq , ubcp|____|clvm|____, itos, vtos, if_0cmp , equal ); | |
413 def(Bytecodes::_ifne , ubcp|____|clvm|____, itos, vtos, if_0cmp , not_equal ); | |
414 def(Bytecodes::_iflt , ubcp|____|clvm|____, itos, vtos, if_0cmp , less ); | |
415 def(Bytecodes::_ifge , ubcp|____|clvm|____, itos, vtos, if_0cmp , greater_equal); | |
416 def(Bytecodes::_ifgt , ubcp|____|clvm|____, itos, vtos, if_0cmp , greater ); | |
417 def(Bytecodes::_ifle , ubcp|____|clvm|____, itos, vtos, if_0cmp , less_equal ); | |
418 def(Bytecodes::_if_icmpeq , ubcp|____|clvm|____, itos, vtos, if_icmp , equal ); | |
419 def(Bytecodes::_if_icmpne , ubcp|____|clvm|____, itos, vtos, if_icmp , not_equal ); | |
420 def(Bytecodes::_if_icmplt , ubcp|____|clvm|____, itos, vtos, if_icmp , less ); | |
421 def(Bytecodes::_if_icmpge , ubcp|____|clvm|____, itos, vtos, if_icmp , greater_equal); | |
422 def(Bytecodes::_if_icmpgt , ubcp|____|clvm|____, itos, vtos, if_icmp , greater ); | |
423 def(Bytecodes::_if_icmple , ubcp|____|clvm|____, itos, vtos, if_icmp , less_equal ); | |
424 def(Bytecodes::_if_acmpeq , ubcp|____|clvm|____, atos, vtos, if_acmp , equal ); | |
425 def(Bytecodes::_if_acmpne , ubcp|____|clvm|____, atos, vtos, if_acmp , not_equal ); | |
426 def(Bytecodes::_goto , ubcp|disp|clvm|____, vtos, vtos, _goto , _ ); | |
427 def(Bytecodes::_jsr , ubcp|disp|____|____, vtos, vtos, jsr , _ ); // result is not an oop, so do not transition to atos | |
428 def(Bytecodes::_ret , ubcp|disp|____|____, vtos, vtos, ret , _ ); | |
429 def(Bytecodes::_tableswitch , ubcp|disp|____|____, itos, vtos, tableswitch , _ ); | |
430 def(Bytecodes::_lookupswitch , ubcp|disp|____|____, itos, itos, lookupswitch , _ ); | |
431 def(Bytecodes::_ireturn , ____|disp|clvm|____, itos, itos, _return , itos ); | |
432 def(Bytecodes::_lreturn , ____|disp|clvm|____, ltos, ltos, _return , ltos ); | |
433 def(Bytecodes::_freturn , ____|disp|clvm|____, ftos, ftos, _return , ftos ); | |
434 def(Bytecodes::_dreturn , ____|disp|clvm|____, dtos, dtos, _return , dtos ); | |
435 def(Bytecodes::_areturn , ____|disp|clvm|____, atos, atos, _return , atos ); | |
436 def(Bytecodes::_return , ____|disp|clvm|____, vtos, vtos, _return , vtos ); | |
1565 | 437 def(Bytecodes::_getstatic , ubcp|____|clvm|____, vtos, vtos, getstatic , f1_byte ); |
438 def(Bytecodes::_putstatic , ubcp|____|clvm|____, vtos, vtos, putstatic , f2_byte ); | |
439 def(Bytecodes::_getfield , ubcp|____|clvm|____, vtos, vtos, getfield , f1_byte ); | |
440 def(Bytecodes::_putfield , ubcp|____|clvm|____, vtos, vtos, putfield , f2_byte ); | |
441 def(Bytecodes::_invokevirtual , ubcp|disp|clvm|____, vtos, vtos, invokevirtual , f2_byte ); | |
442 def(Bytecodes::_invokespecial , ubcp|disp|clvm|____, vtos, vtos, invokespecial , f1_byte ); | |
443 def(Bytecodes::_invokestatic , ubcp|disp|clvm|____, vtos, vtos, invokestatic , f1_byte ); | |
444 def(Bytecodes::_invokeinterface , ubcp|disp|clvm|____, vtos, vtos, invokeinterface , f1_byte ); | |
445 def(Bytecodes::_invokedynamic , ubcp|disp|clvm|____, vtos, vtos, invokedynamic , f1_oop ); | |
0 | 446 def(Bytecodes::_new , ubcp|____|clvm|____, vtos, atos, _new , _ ); |
447 def(Bytecodes::_newarray , ubcp|____|clvm|____, itos, atos, newarray , _ ); | |
448 def(Bytecodes::_anewarray , ubcp|____|clvm|____, itos, atos, anewarray , _ ); | |
449 def(Bytecodes::_arraylength , ____|____|____|____, atos, itos, arraylength , _ ); | |
450 def(Bytecodes::_athrow , ____|disp|____|____, atos, vtos, athrow , _ ); | |
451 def(Bytecodes::_checkcast , ubcp|____|clvm|____, atos, atos, checkcast , _ ); | |
452 def(Bytecodes::_instanceof , ubcp|____|clvm|____, atos, itos, instanceof , _ ); | |
453 def(Bytecodes::_monitorenter , ____|disp|clvm|____, atos, vtos, monitorenter , _ ); | |
454 def(Bytecodes::_monitorexit , ____|____|clvm|____, atos, vtos, monitorexit , _ ); | |
455 def(Bytecodes::_wide , ubcp|disp|____|____, vtos, vtos, wide , _ ); | |
456 def(Bytecodes::_multianewarray , ubcp|____|clvm|____, vtos, atos, multianewarray , _ ); | |
457 def(Bytecodes::_ifnull , ubcp|____|clvm|____, atos, vtos, if_nullcmp , equal ); | |
458 def(Bytecodes::_ifnonnull , ubcp|____|clvm|____, atos, vtos, if_nullcmp , not_equal ); | |
459 def(Bytecodes::_goto_w , ubcp|____|clvm|____, vtos, vtos, goto_w , _ ); | |
460 def(Bytecodes::_jsr_w , ubcp|____|____|____, vtos, vtos, jsr_w , _ ); | |
461 | |
462 // wide Java spec bytecodes | |
463 def(Bytecodes::_iload , ubcp|____|____|iswd, vtos, itos, wide_iload , _ ); | |
464 def(Bytecodes::_lload , ubcp|____|____|iswd, vtos, ltos, wide_lload , _ ); | |
465 def(Bytecodes::_fload , ubcp|____|____|iswd, vtos, ftos, wide_fload , _ ); | |
466 def(Bytecodes::_dload , ubcp|____|____|iswd, vtos, dtos, wide_dload , _ ); | |
467 def(Bytecodes::_aload , ubcp|____|____|iswd, vtos, atos, wide_aload , _ ); | |
468 def(Bytecodes::_istore , ubcp|____|____|iswd, vtos, vtos, wide_istore , _ ); | |
469 def(Bytecodes::_lstore , ubcp|____|____|iswd, vtos, vtos, wide_lstore , _ ); | |
470 def(Bytecodes::_fstore , ubcp|____|____|iswd, vtos, vtos, wide_fstore , _ ); | |
471 def(Bytecodes::_dstore , ubcp|____|____|iswd, vtos, vtos, wide_dstore , _ ); | |
472 def(Bytecodes::_astore , ubcp|____|____|iswd, vtos, vtos, wide_astore , _ ); | |
473 def(Bytecodes::_iinc , ubcp|____|____|iswd, vtos, vtos, wide_iinc , _ ); | |
474 def(Bytecodes::_ret , ubcp|disp|____|iswd, vtos, vtos, wide_ret , _ ); | |
475 def(Bytecodes::_breakpoint , ubcp|disp|clvm|____, vtos, vtos, _breakpoint , _ ); | |
476 | |
477 // JVM bytecodes | |
478 def(Bytecodes::_fast_agetfield , ubcp|____|____|____, atos, atos, fast_accessfield , atos ); | |
479 def(Bytecodes::_fast_bgetfield , ubcp|____|____|____, atos, itos, fast_accessfield , itos ); | |
480 def(Bytecodes::_fast_cgetfield , ubcp|____|____|____, atos, itos, fast_accessfield , itos ); | |
481 def(Bytecodes::_fast_dgetfield , ubcp|____|____|____, atos, dtos, fast_accessfield , dtos ); | |
482 def(Bytecodes::_fast_fgetfield , ubcp|____|____|____, atos, ftos, fast_accessfield , ftos ); | |
483 def(Bytecodes::_fast_igetfield , ubcp|____|____|____, atos, itos, fast_accessfield , itos ); | |
484 def(Bytecodes::_fast_lgetfield , ubcp|____|____|____, atos, ltos, fast_accessfield , ltos ); | |
485 def(Bytecodes::_fast_sgetfield , ubcp|____|____|____, atos, itos, fast_accessfield , itos ); | |
486 | |
487 def(Bytecodes::_fast_aputfield , ubcp|____|____|____, atos, vtos, fast_storefield , atos ); | |
488 def(Bytecodes::_fast_bputfield , ubcp|____|____|____, itos, vtos, fast_storefield , itos ); | |
489 def(Bytecodes::_fast_cputfield , ubcp|____|____|____, itos, vtos, fast_storefield , itos ); | |
490 def(Bytecodes::_fast_dputfield , ubcp|____|____|____, dtos, vtos, fast_storefield , dtos ); | |
491 def(Bytecodes::_fast_fputfield , ubcp|____|____|____, ftos, vtos, fast_storefield , ftos ); | |
492 def(Bytecodes::_fast_iputfield , ubcp|____|____|____, itos, vtos, fast_storefield , itos ); | |
493 def(Bytecodes::_fast_lputfield , ubcp|____|____|____, ltos, vtos, fast_storefield , ltos ); | |
494 def(Bytecodes::_fast_sputfield , ubcp|____|____|____, itos, vtos, fast_storefield , itos ); | |
495 | |
496 def(Bytecodes::_fast_aload_0 , ____|____|____|____, vtos, atos, aload , 0 ); | |
497 def(Bytecodes::_fast_iaccess_0 , ubcp|____|____|____, vtos, itos, fast_xaccess , itos ); | |
498 def(Bytecodes::_fast_aaccess_0 , ubcp|____|____|____, vtos, atos, fast_xaccess , atos ); | |
499 def(Bytecodes::_fast_faccess_0 , ubcp|____|____|____, vtos, ftos, fast_xaccess , ftos ); | |
500 | |
501 def(Bytecodes::_fast_iload , ubcp|____|____|____, vtos, itos, fast_iload , _ ); | |
502 def(Bytecodes::_fast_iload2 , ubcp|____|____|____, vtos, itos, fast_iload2 , _ ); | |
503 def(Bytecodes::_fast_icaload , ubcp|____|____|____, vtos, itos, fast_icaload , _ ); | |
504 | |
1565 | 505 def(Bytecodes::_fast_invokevfinal , ubcp|disp|clvm|____, vtos, vtos, fast_invokevfinal , f2_byte ); |
0 | 506 |
507 def(Bytecodes::_fast_linearswitch , ubcp|disp|____|____, itos, vtos, fast_linearswitch , _ ); | |
508 def(Bytecodes::_fast_binaryswitch , ubcp|disp|____|____, itos, vtos, fast_binaryswitch , _ ); | |
509 | |
1602 | 510 def(Bytecodes::_fast_aldc , ubcp|____|clvm|____, vtos, atos, fast_aldc , false ); |
511 def(Bytecodes::_fast_aldc_w , ubcp|____|clvm|____, vtos, atos, fast_aldc , true ); | |
512 | |
0 | 513 def(Bytecodes::_return_register_finalizer , ____|disp|clvm|____, vtos, vtos, _return , vtos ); |
514 | |
515 def(Bytecodes::_shouldnotreachhere , ____|____|____|____, vtos, vtos, shouldnotreachhere , _ ); | |
516 // platform specific bytecodes | |
517 pd_initialize(); | |
518 | |
519 _is_initialized = true; | |
520 } | |
521 | |
522 #if defined(TEMPLATE_TABLE_BUG) | |
523 #undef iload | |
524 #undef lload | |
525 #undef fload | |
526 #undef dload | |
527 #undef aload | |
528 #undef istore | |
529 #undef lstore | |
530 #undef fstore | |
531 #undef dstore | |
532 #undef astore | |
533 #endif // TEMPLATE_TABLE_BUG | |
534 | |
535 | |
536 void templateTable_init() { | |
537 TemplateTable::initialize(); | |
538 } | |
539 | |
540 | |
541 void TemplateTable::unimplemented_bc() { | |
542 _masm->unimplemented( Bytecodes::name(_desc->bytecode())); | |
543 } | |
544 #endif /* !CC_INTERP */ |