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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP
26 #define SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP
27
28 #include "memory/allocation.hpp"
29 #include "oops/methodData.hpp"
30 #include "oops/method.hpp"
31 #include "runtime/basicLock.hpp"
32 #include "runtime/frame.hpp"
33 #include "runtime/globals.hpp"
34 #include "utilities/globalDefinitions.hpp"
35
36 #ifdef CC_INTERP
37
38 // JavaStack Implementation
39 #define MORE_STACK(count) \
40 (topOfStack -= ((count) * Interpreter::stackElementWords))
41
42 // CVM definitions find hotspot equivalents...
43
44 class InterpreterMacroAssembler;
45
46 union VMJavaVal64 {
47 jlong l;
48 jdouble d;
49 uint32_t v[2];
50 };
51
52
53 typedef class BytecodeInterpreter* interpreterState;
54
555 static void set_locals_float(intptr_t *locals, jfloat value, int offset);
556 static void set_locals_object(intptr_t *locals, oop value, int offset);
557 static void set_locals_double(intptr_t *locals, jdouble value, int offset);
558 static void set_locals_long(intptr_t *locals, jlong value, int offset);
559 static void set_locals_double_from_addr(intptr_t *locals,
560 address addr, int offset);
561 static void set_locals_long_from_addr(intptr_t *locals,
562 address addr, int offset);
563
564 static void astore(intptr_t* topOfStack, int stack_offset,
565 intptr_t* locals, int locals_offset);
566
567 // Support for dup and swap
568 static void copy_stack_slot(intptr_t *tos, int from_offset, int to_offset);
569
570 #ifndef PRODUCT
571 static const char* C_msg(BytecodeInterpreter::messages msg);
572 void print();
573 #endif // PRODUCT
574
575 #ifdef TARGET_ARCH_zero
576 # include "bytecodeInterpreter_zero.hpp"
577 #else
578 #error "Only Zero Bytecode Interpreter is supported"
579 #endif
580
581
582 }; // BytecodeInterpreter
583
584 #endif // CC_INTERP
585
586 #endif // SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP
|
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP
26 #define SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP
27
28 #include "memory/allocation.hpp"
29 #include "oops/methodData.hpp"
30 #include "oops/method.hpp"
31 #include "runtime/basicLock.hpp"
32 #include "runtime/frame.hpp"
33 #include "runtime/globals.hpp"
34 #include "utilities/globalDefinitions.hpp"
35 #include "utilities/macros.hpp"
36
37 #ifdef CC_INTERP
38
39 // JavaStack Implementation
40 #define MORE_STACK(count) \
41 (topOfStack -= ((count) * Interpreter::stackElementWords))
42
43 // CVM definitions find hotspot equivalents...
44
45 class InterpreterMacroAssembler;
46
47 union VMJavaVal64 {
48 jlong l;
49 jdouble d;
50 uint32_t v[2];
51 };
52
53
54 typedef class BytecodeInterpreter* interpreterState;
55
556 static void set_locals_float(intptr_t *locals, jfloat value, int offset);
557 static void set_locals_object(intptr_t *locals, oop value, int offset);
558 static void set_locals_double(intptr_t *locals, jdouble value, int offset);
559 static void set_locals_long(intptr_t *locals, jlong value, int offset);
560 static void set_locals_double_from_addr(intptr_t *locals,
561 address addr, int offset);
562 static void set_locals_long_from_addr(intptr_t *locals,
563 address addr, int offset);
564
565 static void astore(intptr_t* topOfStack, int stack_offset,
566 intptr_t* locals, int locals_offset);
567
568 // Support for dup and swap
569 static void copy_stack_slot(intptr_t *tos, int from_offset, int to_offset);
570
571 #ifndef PRODUCT
572 static const char* C_msg(BytecodeInterpreter::messages msg);
573 void print();
574 #endif // PRODUCT
575
576 #ifdef ZERO
577 # include "bytecodeInterpreter_zero.hpp"
578 #else
579 #error "Only Zero Bytecode Interpreter is supported"
580 #endif
581
582
583 }; // BytecodeInterpreter
584
585 #endif // CC_INTERP
586
587 #endif // SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP
|