0N/A/*
2273N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP
1879N/A#define SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP
1879N/A
605N/A// This file contains the platform-independent parts
0N/A// of the template interpreter generator.
0N/A
0N/A#ifndef CC_INTERP
0N/A
0N/Aclass TemplateInterpreterGenerator: public AbstractInterpreterGenerator {
0N/A protected:
0N/A
0N/A // entry points for shared code sequence
0N/A address _unimplemented_bytecode;
0N/A address _illegal_bytecode_sequence;
0N/A
0N/A // shared code sequences
0N/A // Converter for native abi result to tosca result
0N/A address generate_result_handler_for(BasicType type);
0N/A address generate_slow_signature_handler();
0N/A address generate_error_exit(const char* msg);
0N/A address generate_StackOverflowError_handler();
0N/A address generate_exception_handler(const char* name, const char* message) {
0N/A return generate_exception_handler_common(name, message, false);
0N/A }
0N/A address generate_klass_exception_handler(const char* name) {
0N/A return generate_exception_handler_common(name, NULL, true);
0N/A }
0N/A address generate_exception_handler_common(const char* name, const char* message, bool pass_oop);
0N/A address generate_ClassCastException_handler();
0N/A address generate_ArrayIndexOutOfBounds_handler(const char* name);
0N/A address generate_continuation_for(TosState state);
1059N/A address generate_return_entry_for(TosState state, int step);
0N/A address generate_earlyret_entry_for(TosState state);
0N/A address generate_deopt_entry_for(TosState state, int step);
0N/A address generate_safept_entry_for(TosState state, address runtime_entry);
0N/A void generate_throw_exception();
0N/A
0N/A // entry point generator
0N/A// address generate_method_entry(AbstractInterpreter::MethodKind kind);
0N/A
0N/A // Instruction generation
0N/A void generate_and_dispatch (Template* t, TosState tos_out = ilgl);
0N/A void set_vtos_entry_points (Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep);
0N/A void set_short_entry_points(Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep);
0N/A void set_wide_entry_point (Template* t, address& wep);
0N/A
0N/A void set_entry_points(Bytecodes::Code code);
0N/A void set_unimplemented(int i);
0N/A void set_entry_points_for_all_bytes();
0N/A void set_safepoints_for_all_bytes();
0N/A
0N/A // Helpers for generate_and_dispatch
0N/A address generate_trace_code(TosState state) PRODUCT_RETURN0;
0N/A void count_bytecode() PRODUCT_RETURN;
0N/A void histogram_bytecode(Template* t) PRODUCT_RETURN;
0N/A void histogram_bytecode_pair(Template* t) PRODUCT_RETURN;
0N/A void trace_bytecode(Template* t) PRODUCT_RETURN;
0N/A void stop_interpreter_at() PRODUCT_RETURN;
0N/A
0N/A void generate_all();
0N/A
0N/A public:
0N/A TemplateInterpreterGenerator(StubQueue* _code);
0N/A
1879N/A#ifdef TARGET_ARCH_x86
1879N/A# include "templateInterpreterGenerator_x86.hpp"
1879N/A#endif
1879N/A#ifdef TARGET_ARCH_sparc
1879N/A# include "templateInterpreterGenerator_sparc.hpp"
1879N/A#endif
1879N/A#ifdef TARGET_ARCH_zero
1879N/A# include "templateInterpreterGenerator_zero.hpp"
1879N/A#endif
2073N/A#ifdef TARGET_ARCH_arm
2073N/A# include "templateInterpreterGenerator_arm.hpp"
2073N/A#endif
2073N/A#ifdef TARGET_ARCH_ppc
2073N/A# include "templateInterpreterGenerator_ppc.hpp"
2073N/A#endif
1879N/A
0N/A
0N/A};
0N/A
0N/A#endif // !CC_INTERP
1879N/A
1879N/A#endif // SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP