Mercurial > hg > graal-compiler
annotate src/share/vm/interpreter/bytecodeInterpreter.hpp @ 3272:01147d8aac1d
7009923: JSR 292: VM crash in JavaThread::last_frame
Summary: Handle stack overflow before the first frame is called, by printing out the called method and not walking the stack.
Reviewed-by: dholmes, phh, dsamersoff
author | coleenp |
---|---|
date | Tue, 26 Apr 2011 14:04:43 -0400 |
parents | 4b95bbb36464 |
children | da91efe96a93 |
rev | line source |
---|---|
0 | 1 /* |
2426
1d1603768966
7010070: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - second pass
trims
parents:
2192
diff
changeset
|
2 * Copyright (c) 2002, 2011, 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:
1509
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1509
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:
1509
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP |
26 #define SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP | |
27 | |
28 #include "memory/allocation.hpp" | |
29 #include "oops/methodDataOop.hpp" | |
30 #include "oops/methodOop.hpp" | |
31 #include "runtime/basicLock.hpp" | |
32 #include "runtime/frame.hpp" | |
33 #include "runtime/globals.hpp" | |
34 #include "utilities/globalDefinitions.hpp" | |
35 #ifdef TARGET_ARCH_x86 | |
36 # include "bytes_x86.hpp" | |
37 #endif | |
38 #ifdef TARGET_ARCH_sparc | |
39 # include "bytes_sparc.hpp" | |
40 #endif | |
41 #ifdef TARGET_ARCH_zero | |
42 # include "bytes_zero.hpp" | |
43 #endif | |
2192
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
44 #ifdef TARGET_ARCH_arm |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
45 # include "bytes_arm.hpp" |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
46 #endif |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
47 #ifdef TARGET_ARCH_ppc |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
48 # include "bytes_ppc.hpp" |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
49 #endif |
1972 | 50 |
0 | 51 #ifdef CC_INTERP |
52 | |
53 // CVM definitions find hotspot equivalents... | |
54 | |
55 union VMJavaVal64 { | |
56 jlong l; | |
57 jdouble d; | |
58 uint32_t v[2]; | |
59 }; | |
60 | |
61 | |
62 typedef class BytecodeInterpreter* interpreterState; | |
63 | |
64 struct call_message { | |
65 class methodOopDesc* _callee; /* method to call during call_method request */ | |
66 address _callee_entry_point; /* address to jump to for call_method request */ | |
67 int _bcp_advance; /* size of the invoke bytecode operation */ | |
68 }; | |
69 | |
70 struct osr_message { | |
71 address _osr_buf; /* the osr buffer */ | |
72 address _osr_entry; /* the entry to the osr method */ | |
73 }; | |
74 | |
75 struct osr_result { | |
76 nmethod* nm; /* osr nmethod */ | |
77 address return_addr; /* osr blob return address */ | |
78 }; | |
79 | |
80 // Result returned to frame manager | |
81 union frame_manager_message { | |
82 call_message _to_call; /* describes callee */ | |
83 Bytecodes::Code _return_kind; /* i_return, a_return, ... */ | |
84 osr_message _osr; /* describes the osr */ | |
85 osr_result _osr_result; /* result of OSR request */ | |
86 }; | |
87 | |
88 class BytecodeInterpreter : StackObj { | |
89 friend class SharedRuntime; | |
90 friend class AbstractInterpreterGenerator; | |
91 friend class CppInterpreterGenerator; | |
92 friend class InterpreterGenerator; | |
93 friend class InterpreterMacroAssembler; | |
94 friend class frame; | |
95 friend class VMStructs; | |
96 | |
97 public: | |
98 enum messages { | |
99 no_request = 0, // unused | |
100 initialize, // Perform one time interpreter initializations (assumes all switches set) | |
101 // status message to C++ interpreter | |
102 method_entry, // initial method entry to interpreter | |
103 method_resume, // frame manager response to return_from_method request (assuming a frame to resume) | |
104 deopt_resume, // returning from a native call into a deopted frame | |
105 deopt_resume2, // deopt resume as a result of a PopFrame | |
106 got_monitors, // frame manager response to more_monitors request | |
107 rethrow_exception, // unwinding and throwing exception | |
108 // requests to frame manager from C++ interpreter | |
109 call_method, // request for new frame from interpreter, manager responds with method_entry | |
2480 | 110 call_method_handle, // like the above, except the callee is a method handle |
0 | 111 return_from_method, // request from interpreter to unwind, manager responds with method_continue |
112 more_monitors, // need a new monitor | |
113 throwing_exception, // unwind stack and rethrow | |
114 popping_frame, // unwind call and retry call | |
115 do_osr // request this invocation be OSR's | |
116 }; | |
117 | |
118 private: | |
119 JavaThread* _thread; // the vm's java thread pointer | |
120 address _bcp; // instruction pointer | |
121 intptr_t* _locals; // local variable pointer | |
122 constantPoolCacheOop _constants; // constant pool cache | |
123 methodOop _method; // method being executed | |
124 DataLayout* _mdx; // compiler profiling data for current bytecode | |
125 intptr_t* _stack; // expression stack | |
126 messages _msg; // frame manager <-> interpreter message | |
127 frame_manager_message _result; // result to frame manager | |
128 interpreterState _prev_link; // previous interpreter state | |
129 oop _oop_temp; // mirror for interpreted native, null otherwise | |
130 intptr_t* _stack_base; // base of expression stack | |
131 intptr_t* _stack_limit; // limit of expression stack | |
132 BasicObjectLock* _monitor_base; // base of monitors on the native stack | |
133 | |
134 | |
135 public: | |
136 // Constructor is only used by the initialization step. All other instances are created | |
137 // by the frame manager. | |
138 BytecodeInterpreter(messages msg); | |
139 | |
140 // | |
141 // Deoptimization support | |
142 // | |
143 static void layout_interpreterState(interpreterState to_fill, | |
144 frame* caller, | |
145 frame* interpreter_frame, | |
146 methodOop method, | |
147 intptr_t* locals, | |
148 intptr_t* stack, | |
149 intptr_t* stack_base, | |
150 intptr_t* monitor_base, | |
151 intptr_t* frame_bottom, | |
152 bool top_frame); | |
153 | |
154 /* | |
155 * Generic 32-bit wide "Java slot" definition. This type occurs | |
156 * in operand stacks, Java locals, object fields, constant pools. | |
157 */ | |
158 union VMJavaVal32 { | |
159 jint i; | |
160 jfloat f; | |
161 class oopDesc* r; | |
162 uint32_t raw; | |
163 }; | |
164 | |
165 /* | |
166 * Generic 64-bit Java value definition | |
167 */ | |
168 union VMJavaVal64 { | |
169 jlong l; | |
170 jdouble d; | |
171 uint32_t v[2]; | |
172 }; | |
173 | |
174 /* | |
175 * Generic 32-bit wide "Java slot" definition. This type occurs | |
176 * in Java locals, object fields, constant pools, and | |
177 * operand stacks (as a CVMStackVal32). | |
178 */ | |
179 typedef union VMSlotVal32 { | |
180 VMJavaVal32 j; /* For "Java" values */ | |
181 address a; /* a return created by jsr or jsr_w */ | |
182 } VMSlotVal32; | |
183 | |
184 | |
185 /* | |
186 * Generic 32-bit wide stack slot definition. | |
187 */ | |
188 union VMStackVal32 { | |
189 VMJavaVal32 j; /* For "Java" values */ | |
190 VMSlotVal32 s; /* any value from a "slot" or locals[] */ | |
191 }; | |
192 | |
193 inline JavaThread* thread() { return _thread; } | |
194 | |
195 inline address bcp() { return _bcp; } | |
196 inline void set_bcp(address new_bcp) { _bcp = new_bcp; } | |
197 | |
198 inline intptr_t* locals() { return _locals; } | |
199 | |
200 inline constantPoolCacheOop constants() { return _constants; } | |
201 inline methodOop method() { return _method; } | |
202 inline DataLayout* mdx() { return _mdx; } | |
203 inline void set_mdx(DataLayout *new_mdx) { _mdx = new_mdx; } | |
204 | |
205 inline messages msg() { return _msg; } | |
206 inline void set_msg(messages new_msg) { _msg = new_msg; } | |
207 | |
208 inline methodOop callee() { return _result._to_call._callee; } | |
209 inline void set_callee(methodOop new_callee) { _result._to_call._callee = new_callee; } | |
210 inline void set_callee_entry_point(address entry) { _result._to_call._callee_entry_point = entry; } | |
211 inline void set_osr_buf(address buf) { _result._osr._osr_buf = buf; } | |
212 inline void set_osr_entry(address entry) { _result._osr._osr_entry = entry; } | |
213 inline int bcp_advance() { return _result._to_call._bcp_advance; } | |
214 inline void set_bcp_advance(int count) { _result._to_call._bcp_advance = count; } | |
215 | |
216 inline void set_return_kind(Bytecodes::Code kind) { _result._return_kind = kind; } | |
217 | |
218 inline interpreterState prev() { return _prev_link; } | |
219 | |
220 inline intptr_t* stack() { return _stack; } | |
221 inline void set_stack(intptr_t* new_stack) { _stack = new_stack; } | |
222 | |
223 | |
224 inline intptr_t* stack_base() { return _stack_base; } | |
225 inline intptr_t* stack_limit() { return _stack_limit; } | |
226 | |
227 inline BasicObjectLock* monitor_base() { return _monitor_base; } | |
228 | |
229 /* | |
230 * 64-bit Arithmetic: | |
231 * | |
232 * The functions below follow the semantics of the | |
233 * ladd, land, ldiv, lmul, lor, lxor, and lrem bytecodes, | |
234 * respectively. | |
235 */ | |
236 | |
237 static jlong VMlongAdd(jlong op1, jlong op2); | |
238 static jlong VMlongAnd(jlong op1, jlong op2); | |
239 static jlong VMlongDiv(jlong op1, jlong op2); | |
240 static jlong VMlongMul(jlong op1, jlong op2); | |
241 static jlong VMlongOr (jlong op1, jlong op2); | |
242 static jlong VMlongSub(jlong op1, jlong op2); | |
243 static jlong VMlongXor(jlong op1, jlong op2); | |
244 static jlong VMlongRem(jlong op1, jlong op2); | |
245 | |
246 /* | |
247 * Shift: | |
248 * | |
249 * The functions below follow the semantics of the | |
250 * lushr, lshl, and lshr bytecodes, respectively. | |
251 */ | |
252 | |
253 static jlong VMlongUshr(jlong op1, jint op2); | |
254 static jlong VMlongShl (jlong op1, jint op2); | |
255 static jlong VMlongShr (jlong op1, jint op2); | |
256 | |
257 /* | |
258 * Unary: | |
259 * | |
260 * Return the negation of "op" (-op), according to | |
261 * the semantics of the lneg bytecode. | |
262 */ | |
263 | |
264 static jlong VMlongNeg(jlong op); | |
265 | |
266 /* | |
267 * Return the complement of "op" (~op) | |
268 */ | |
269 | |
270 static jlong VMlongNot(jlong op); | |
271 | |
272 | |
273 /* | |
274 * Comparisons to 0: | |
275 */ | |
276 | |
277 static int32_t VMlongLtz(jlong op); /* op <= 0 */ | |
278 static int32_t VMlongGez(jlong op); /* op >= 0 */ | |
279 static int32_t VMlongEqz(jlong op); /* op == 0 */ | |
280 | |
281 /* | |
282 * Between operands: | |
283 */ | |
284 | |
285 static int32_t VMlongEq(jlong op1, jlong op2); /* op1 == op2 */ | |
286 static int32_t VMlongNe(jlong op1, jlong op2); /* op1 != op2 */ | |
287 static int32_t VMlongGe(jlong op1, jlong op2); /* op1 >= op2 */ | |
288 static int32_t VMlongLe(jlong op1, jlong op2); /* op1 <= op2 */ | |
289 static int32_t VMlongLt(jlong op1, jlong op2); /* op1 < op2 */ | |
290 static int32_t VMlongGt(jlong op1, jlong op2); /* op1 > op2 */ | |
291 | |
292 /* | |
293 * Comparisons (returning an jint value: 0, 1, or -1) | |
294 * | |
295 * Between operands: | |
296 * | |
297 * Compare "op1" and "op2" according to the semantics of the | |
298 * "lcmp" bytecode. | |
299 */ | |
300 | |
301 static int32_t VMlongCompare(jlong op1, jlong op2); | |
302 | |
303 /* | |
304 * Convert int to long, according to "i2l" bytecode semantics | |
305 */ | |
306 static jlong VMint2Long(jint val); | |
307 | |
308 /* | |
309 * Convert long to int, according to "l2i" bytecode semantics | |
310 */ | |
311 static jint VMlong2Int(jlong val); | |
312 | |
313 /* | |
314 * Convert long to float, according to "l2f" bytecode semantics | |
315 */ | |
316 static jfloat VMlong2Float(jlong val); | |
317 | |
318 /* | |
319 * Convert long to double, according to "l2d" bytecode semantics | |
320 */ | |
321 static jdouble VMlong2Double(jlong val); | |
322 | |
323 /* | |
324 * Java floating-point float value manipulation. | |
325 * | |
326 * The result argument is, once again, an lvalue. | |
327 * | |
328 * Arithmetic: | |
329 * | |
330 * The functions below follow the semantics of the | |
331 * fadd, fsub, fmul, fdiv, and frem bytecodes, | |
332 * respectively. | |
333 */ | |
334 | |
335 static jfloat VMfloatAdd(jfloat op1, jfloat op2); | |
336 static jfloat VMfloatSub(jfloat op1, jfloat op2); | |
337 static jfloat VMfloatMul(jfloat op1, jfloat op2); | |
338 static jfloat VMfloatDiv(jfloat op1, jfloat op2); | |
339 static jfloat VMfloatRem(jfloat op1, jfloat op2); | |
340 | |
341 /* | |
342 * Unary: | |
343 * | |
344 * Return the negation of "op" (-op), according to | |
345 * the semantics of the fneg bytecode. | |
346 */ | |
347 | |
348 static jfloat VMfloatNeg(jfloat op); | |
349 | |
350 /* | |
351 * Comparisons (returning an int value: 0, 1, or -1) | |
352 * | |
353 * Between operands: | |
354 * | |
355 * Compare "op1" and "op2" according to the semantics of the | |
356 * "fcmpl" (direction is -1) or "fcmpg" (direction is 1) bytecodes. | |
357 */ | |
358 | |
359 static int32_t VMfloatCompare(jfloat op1, jfloat op2, | |
360 int32_t direction); | |
361 /* | |
362 * Conversion: | |
363 */ | |
364 | |
365 /* | |
366 * Convert float to double, according to "f2d" bytecode semantics | |
367 */ | |
368 | |
369 static jdouble VMfloat2Double(jfloat op); | |
370 | |
371 /* | |
372 ****************************************** | |
373 * Java double floating-point manipulation. | |
374 ****************************************** | |
375 * | |
376 * The result argument is, once again, an lvalue. | |
377 * | |
378 * Conversions: | |
379 */ | |
380 | |
381 /* | |
382 * Convert double to int, according to "d2i" bytecode semantics | |
383 */ | |
384 | |
385 static jint VMdouble2Int(jdouble val); | |
386 | |
387 /* | |
388 * Convert double to float, according to "d2f" bytecode semantics | |
389 */ | |
390 | |
391 static jfloat VMdouble2Float(jdouble val); | |
392 | |
393 /* | |
394 * Convert int to double, according to "i2d" bytecode semantics | |
395 */ | |
396 | |
397 static jdouble VMint2Double(jint val); | |
398 | |
399 /* | |
400 * Arithmetic: | |
401 * | |
402 * The functions below follow the semantics of the | |
403 * dadd, dsub, ddiv, dmul, and drem bytecodes, respectively. | |
404 */ | |
405 | |
406 static jdouble VMdoubleAdd(jdouble op1, jdouble op2); | |
407 static jdouble VMdoubleSub(jdouble op1, jdouble op2); | |
408 static jdouble VMdoubleDiv(jdouble op1, jdouble op2); | |
409 static jdouble VMdoubleMul(jdouble op1, jdouble op2); | |
410 static jdouble VMdoubleRem(jdouble op1, jdouble op2); | |
411 | |
412 /* | |
413 * Unary: | |
414 * | |
415 * Return the negation of "op" (-op), according to | |
416 * the semantics of the dneg bytecode. | |
417 */ | |
418 | |
419 static jdouble VMdoubleNeg(jdouble op); | |
420 | |
421 /* | |
422 * Comparisons (returning an int32_t value: 0, 1, or -1) | |
423 * | |
424 * Between operands: | |
425 * | |
426 * Compare "op1" and "op2" according to the semantics of the | |
427 * "dcmpl" (direction is -1) or "dcmpg" (direction is 1) bytecodes. | |
428 */ | |
429 | |
430 static int32_t VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction); | |
431 | |
432 /* | |
433 * Copy two typeless 32-bit words from one location to another. | |
434 * This is semantically equivalent to: | |
435 * | |
436 * to[0] = from[0]; | |
437 * to[1] = from[1]; | |
438 * | |
439 * but this interface is provided for those platforms that could | |
440 * optimize this into a single 64-bit transfer. | |
441 */ | |
442 | |
443 static void VMmemCopy64(uint32_t to[2], const uint32_t from[2]); | |
444 | |
445 | |
446 // Arithmetic operations | |
447 | |
448 /* | |
449 * Java arithmetic methods. | |
450 * The functions below follow the semantics of the | |
451 * iadd, isub, imul, idiv, irem, iand, ior, ixor, | |
452 * and ineg bytecodes, respectively. | |
453 */ | |
454 | |
455 static jint VMintAdd(jint op1, jint op2); | |
456 static jint VMintSub(jint op1, jint op2); | |
457 static jint VMintMul(jint op1, jint op2); | |
458 static jint VMintDiv(jint op1, jint op2); | |
459 static jint VMintRem(jint op1, jint op2); | |
460 static jint VMintAnd(jint op1, jint op2); | |
461 static jint VMintOr (jint op1, jint op2); | |
462 static jint VMintXor(jint op1, jint op2); | |
463 | |
464 /* | |
465 * Shift Operation: | |
466 * The functions below follow the semantics of the | |
467 * iushr, ishl, and ishr bytecodes, respectively. | |
468 */ | |
469 | |
1681
126ea7725993
6953477: Increase portability and flexibility of building Hotspot
bobv
parents:
1552
diff
changeset
|
470 static juint VMintUshr(jint op, jint num); |
0 | 471 static jint VMintShl (jint op, jint num); |
472 static jint VMintShr (jint op, jint num); | |
473 | |
474 /* | |
475 * Unary Operation: | |
476 * | |
477 * Return the negation of "op" (-op), according to | |
478 * the semantics of the ineg bytecode. | |
479 */ | |
480 | |
481 static jint VMintNeg(jint op); | |
482 | |
483 /* | |
484 * Int Conversions: | |
485 */ | |
486 | |
487 /* | |
488 * Convert int to float, according to "i2f" bytecode semantics | |
489 */ | |
490 | |
491 static jfloat VMint2Float(jint val); | |
492 | |
493 /* | |
494 * Convert int to byte, according to "i2b" bytecode semantics | |
495 */ | |
496 | |
497 static jbyte VMint2Byte(jint val); | |
498 | |
499 /* | |
500 * Convert int to char, according to "i2c" bytecode semantics | |
501 */ | |
502 | |
503 static jchar VMint2Char(jint val); | |
504 | |
505 /* | |
506 * Convert int to short, according to "i2s" bytecode semantics | |
507 */ | |
508 | |
509 static jshort VMint2Short(jint val); | |
510 | |
511 /*========================================================================= | |
512 * Bytecode interpreter operations | |
513 *=======================================================================*/ | |
514 | |
515 static void dup(intptr_t *tos); | |
516 static void dup2(intptr_t *tos); | |
517 static void dup_x1(intptr_t *tos); /* insert top word two down */ | |
518 static void dup_x2(intptr_t *tos); /* insert top word three down */ | |
519 static void dup2_x1(intptr_t *tos); /* insert top 2 slots three down */ | |
520 static void dup2_x2(intptr_t *tos); /* insert top 2 slots four down */ | |
521 static void swap(intptr_t *tos); /* swap top two elements */ | |
522 | |
523 // umm don't like this method modifies its object | |
524 | |
525 // The Interpreter used when | |
526 static void run(interpreterState istate); | |
527 // The interpreter used if JVMTI needs interpreter events | |
528 static void runWithChecks(interpreterState istate); | |
529 static void End_Of_Interpreter(void); | |
530 | |
531 // Inline static functions for Java Stack and Local manipulation | |
532 | |
533 static address stack_slot(intptr_t *tos, int offset); | |
534 static jint stack_int(intptr_t *tos, int offset); | |
535 static jfloat stack_float(intptr_t *tos, int offset); | |
536 static oop stack_object(intptr_t *tos, int offset); | |
537 static jdouble stack_double(intptr_t *tos, int offset); | |
538 static jlong stack_long(intptr_t *tos, int offset); | |
539 | |
540 // only used for value types | |
541 static void set_stack_slot(intptr_t *tos, address value, int offset); | |
542 static void set_stack_int(intptr_t *tos, int value, int offset); | |
543 static void set_stack_float(intptr_t *tos, jfloat value, int offset); | |
544 static void set_stack_object(intptr_t *tos, oop value, int offset); | |
545 | |
546 // needs to be platform dep for the 32 bit platforms. | |
547 static void set_stack_double(intptr_t *tos, jdouble value, int offset); | |
548 static void set_stack_long(intptr_t *tos, jlong value, int offset); | |
549 | |
550 static void set_stack_double_from_addr(intptr_t *tos, address addr, int offset); | |
551 static void set_stack_long_from_addr(intptr_t *tos, address addr, int offset); | |
552 | |
553 // Locals | |
554 | |
555 static address locals_slot(intptr_t* locals, int offset); | |
556 static jint locals_int(intptr_t* locals, int offset); | |
557 static jfloat locals_float(intptr_t* locals, int offset); | |
558 static oop locals_object(intptr_t* locals, int offset); | |
559 static jdouble locals_double(intptr_t* locals, int offset); | |
560 static jlong locals_long(intptr_t* locals, int offset); | |
561 | |
562 static address locals_long_at(intptr_t* locals, int offset); | |
563 static address locals_double_at(intptr_t* locals, int offset); | |
564 | |
565 static void set_locals_slot(intptr_t *locals, address value, int offset); | |
566 static void set_locals_int(intptr_t *locals, jint value, int offset); | |
567 static void set_locals_float(intptr_t *locals, jfloat value, int offset); | |
568 static void set_locals_object(intptr_t *locals, oop value, int offset); | |
569 static void set_locals_double(intptr_t *locals, jdouble value, int offset); | |
570 static void set_locals_long(intptr_t *locals, jlong value, int offset); | |
571 static void set_locals_double_from_addr(intptr_t *locals, | |
572 address addr, int offset); | |
573 static void set_locals_long_from_addr(intptr_t *locals, | |
574 address addr, int offset); | |
575 | |
576 static void astore(intptr_t* topOfStack, int stack_offset, | |
577 intptr_t* locals, int locals_offset); | |
578 | |
579 // Support for dup and swap | |
580 static void copy_stack_slot(intptr_t *tos, int from_offset, int to_offset); | |
581 | |
582 #ifndef PRODUCT | |
583 static const char* C_msg(BytecodeInterpreter::messages msg); | |
584 void print(); | |
585 #endif // PRODUCT | |
586 | |
587 // Platform fields/methods | |
1972 | 588 #ifdef TARGET_ARCH_x86 |
589 # include "bytecodeInterpreter_x86.hpp" | |
590 #endif | |
591 #ifdef TARGET_ARCH_sparc | |
592 # include "bytecodeInterpreter_sparc.hpp" | |
593 #endif | |
594 #ifdef TARGET_ARCH_zero | |
595 # include "bytecodeInterpreter_zero.hpp" | |
596 #endif | |
2192
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
597 #ifdef TARGET_ARCH_arm |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
598 # include "bytecodeInterpreter_arm.hpp" |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
599 #endif |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
600 #ifdef TARGET_ARCH_ppc |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
601 # include "bytecodeInterpreter_ppc.hpp" |
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
602 #endif |
1972 | 603 |
0 | 604 |
605 }; // BytecodeInterpreter | |
606 | |
607 #endif // CC_INTERP | |
1972 | 608 |
609 #endif // SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP |