Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/interpreter/cppInterpreter.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_CPPINTERPRETER_HPP25#define SHARE_VM_INTERPRETER_CPPINTERPRETER_HPP2627#include "interpreter/abstractInterpreter.hpp"2829#ifdef CC_INTERP3031// This file contains the platform-independent parts32// of the c++ interpreter3334class CppInterpreter: public AbstractInterpreter {35friend class VMStructs;36friend class Interpreter; // contains()37friend class InterpreterGenerator; // result handlers38friend class CppInterpreterGenerator; // result handlers39public:404142protected:4344// tosca result -> stack result45static address _tosca_to_stack[number_of_result_handlers]; // converts tosca to C++ interpreter stack result46// stack result -> stack result47static address _stack_to_stack[number_of_result_handlers]; // pass result between C++ interpreter calls48// stack result -> native abi result49static address _stack_to_native_abi[number_of_result_handlers]; // converts C++ interpreter results to native abi5051// this is to allow frame and only frame to use contains().52friend class frame;5354public:55// Initialization/debugging56static void initialize();57// this only returns whether a pc is within generated code for the interpreter.5859// This is a moderately dubious interface for the c++ interpreter. Only60// frame code and debug.cpp should be using it.61static bool contains(address pc);6263public:646566// No displatch table to switch so no need for these to do anything special67static void notice_safepoints() {}68static void ignore_safepoints() {}6970static address native_result_to_tosca() { return (address)_native_abi_to_tosca; } // aka result handler71static address tosca_result_to_stack() { return (address)_tosca_to_stack; }72static address stack_result_to_stack() { return (address)_stack_to_stack; }73static address stack_result_to_native() { return (address)_stack_to_native_abi; }7475static address native_result_to_tosca(int index) { return _native_abi_to_tosca[index]; } // aka result handler76static address tosca_result_to_stack(int index) { return _tosca_to_stack[index]; }77static address stack_result_to_stack(int index) { return _stack_to_stack[index]; }78static address stack_result_to_native(int index) { return _stack_to_native_abi[index]; }7980static address return_entry (TosState state, int length, Bytecodes::Code code);81static address deopt_entry (TosState state, int length);8283#ifdef TARGET_ARCH_x8684# include "cppInterpreter_x86.hpp"85#endif86#ifdef TARGET_ARCH_aarch3287# include "cppInterpreter_aarch32.hpp"88#endif89#ifdef TARGET_ARCH_aarch6490# include "cppInterpreter_aarch64.hpp"91#endif92#ifdef TARGET_ARCH_sparc93# include "cppInterpreter_sparc.hpp"94#endif95#ifdef TARGET_ARCH_zero96# include "cppInterpreter_zero.hpp"97#endif98#ifdef TARGET_ARCH_arm99# include "cppInterpreter_arm.hpp"100#endif101#ifdef TARGET_ARCH_ppc102# include "cppInterpreter_ppc.hpp"103#endif104105106};107108#endif // CC_INTERP109110#endif // SHARE_VM_INTERPRETER_CPPINTERPRETER_HPP111112113