Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp
32285 views
/*1* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP25#define SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP2627// This file contains the platform-independent parts28// of the template interpreter generator.2930#ifndef CC_INTERP3132class TemplateInterpreterGenerator: public AbstractInterpreterGenerator {33protected:3435// entry points for shared code sequence36address _unimplemented_bytecode;37address _illegal_bytecode_sequence;3839// shared code sequences40// Converter for native abi result to tosca result41address generate_result_handler_for(BasicType type);42address generate_slow_signature_handler();43address generate_error_exit(const char* msg);44address generate_StackOverflowError_handler();45address generate_exception_handler(const char* name, const char* message) {46return generate_exception_handler_common(name, message, false);47}48address generate_klass_exception_handler(const char* name) {49return generate_exception_handler_common(name, NULL, true);50}51address generate_exception_handler_common(const char* name, const char* message, bool pass_oop);52address generate_ClassCastException_handler();53address generate_ArrayIndexOutOfBounds_handler(const char* name);54address generate_continuation_for(TosState state);55address generate_return_entry_for(TosState state, int step, size_t index_size);56address generate_earlyret_entry_for(TosState state);57address generate_deopt_entry_for(TosState state, int step);58address generate_safept_entry_for(TosState state, address runtime_entry);59void generate_throw_exception();6061// entry point generator62// address generate_method_entry(AbstractInterpreter::MethodKind kind);6364// Instruction generation65void generate_and_dispatch (Template* t, TosState tos_out = ilgl);66void set_vtos_entry_points (Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep);67void set_short_entry_points(Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep);68void set_wide_entry_point (Template* t, address& wep);6970void set_entry_points(Bytecodes::Code code);71void set_unimplemented(int i);72void set_entry_points_for_all_bytes();73void set_safepoints_for_all_bytes();7475// Helpers for generate_and_dispatch76address generate_trace_code(TosState state) PRODUCT_RETURN0;77void count_bytecode() PRODUCT_RETURN;78void histogram_bytecode(Template* t) PRODUCT_RETURN;79void histogram_bytecode_pair(Template* t) PRODUCT_RETURN;80void trace_bytecode(Template* t) PRODUCT_RETURN;81void stop_interpreter_at() PRODUCT_RETURN;8283void generate_all();8485public:86TemplateInterpreterGenerator(StubQueue* _code);8788#ifdef TARGET_ARCH_x8689# include "templateInterpreterGenerator_x86.hpp"90#endif91#ifdef TARGET_ARCH_aarch3292# include "templateInterpreterGenerator_aarch32.hpp"93#endif94#ifdef TARGET_ARCH_aarch6495# include "templateInterpreterGenerator_aarch64.hpp"96#endif97#ifdef TARGET_ARCH_sparc98# include "templateInterpreterGenerator_sparc.hpp"99#endif100#ifdef TARGET_ARCH_zero101# include "templateInterpreterGenerator_zero.hpp"102#endif103#ifdef TARGET_ARCH_arm104# include "templateInterpreterGenerator_arm.hpp"105#endif106#ifdef TARGET_ARCH_ppc107# include "templateInterpreterGenerator_ppc.hpp"108#endif109110111};112113#endif // !CC_INTERP114115#endif // SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP116117118