Thu, 24 Mar 2011 02:11:50 -0700
7030207: Zero tweak to remove accidentally incorporated code
Summary: IcedTea contains a now-unmaintained ARM-specific interpreter and part of that interpreter was accidentally incorporated in one of the webrevs when Zero was initially imported.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
duke@435 | 1 | /* |
stefank@2314 | 2 | * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | * |
duke@435 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | * under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | * published by the Free Software Foundation. |
duke@435 | 8 | * |
duke@435 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | * accompanied this code). |
duke@435 | 14 | * |
duke@435 | 15 | * You should have received a copy of the GNU General Public License version |
duke@435 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
duke@435 | 22 | * |
duke@435 | 23 | */ |
duke@435 | 24 | |
stefank@2314 | 25 | #ifndef SHARE_VM_INTERPRETER_CPPINTERPRETER_HPP |
stefank@2314 | 26 | #define SHARE_VM_INTERPRETER_CPPINTERPRETER_HPP |
stefank@2314 | 27 | |
stefank@2314 | 28 | #include "interpreter/abstractInterpreter.hpp" |
stefank@2314 | 29 | |
duke@435 | 30 | #ifdef CC_INTERP |
duke@435 | 31 | |
twisti@1040 | 32 | // This file contains the platform-independent parts |
duke@435 | 33 | // of the c++ interpreter |
duke@435 | 34 | |
duke@435 | 35 | class CppInterpreter: public AbstractInterpreter { |
duke@435 | 36 | friend class VMStructs; |
duke@435 | 37 | friend class Interpreter; // contains() |
duke@435 | 38 | friend class InterpreterGenerator; // result handlers |
duke@435 | 39 | friend class CppInterpreterGenerator; // result handlers |
duke@435 | 40 | public: |
duke@435 | 41 | |
duke@435 | 42 | |
duke@435 | 43 | protected: |
duke@435 | 44 | |
duke@435 | 45 | // tosca result -> stack result |
duke@435 | 46 | static address _tosca_to_stack[number_of_result_handlers]; // converts tosca to C++ interpreter stack result |
duke@435 | 47 | // stack result -> stack result |
duke@435 | 48 | static address _stack_to_stack[number_of_result_handlers]; // pass result between C++ interpreter calls |
duke@435 | 49 | // stack result -> native abi result |
duke@435 | 50 | static address _stack_to_native_abi[number_of_result_handlers]; // converts C++ interpreter results to native abi |
duke@435 | 51 | |
duke@435 | 52 | // this is to allow frame and only frame to use contains(). |
duke@435 | 53 | friend class frame; |
duke@435 | 54 | |
duke@435 | 55 | public: |
duke@435 | 56 | // Initialization/debugging |
duke@435 | 57 | static void initialize(); |
duke@435 | 58 | // this only returns whether a pc is within generated code for the interpreter. |
duke@435 | 59 | |
duke@435 | 60 | // This is a moderately dubious interface for the c++ interpreter. Only |
duke@435 | 61 | // frame code and debug.cpp should be using it. |
duke@435 | 62 | static bool contains(address pc); |
duke@435 | 63 | |
duke@435 | 64 | public: |
duke@435 | 65 | |
duke@435 | 66 | |
duke@435 | 67 | // No displatch table to switch so no need for these to do anything special |
duke@435 | 68 | static void notice_safepoints() {} |
duke@435 | 69 | static void ignore_safepoints() {} |
duke@435 | 70 | |
duke@435 | 71 | static address native_result_to_tosca() { return (address)_native_abi_to_tosca; } // aka result handler |
duke@435 | 72 | static address tosca_result_to_stack() { return (address)_tosca_to_stack; } |
duke@435 | 73 | static address stack_result_to_stack() { return (address)_stack_to_stack; } |
duke@435 | 74 | static address stack_result_to_native() { return (address)_stack_to_native_abi; } |
duke@435 | 75 | |
duke@435 | 76 | static address native_result_to_tosca(int index) { return _native_abi_to_tosca[index]; } // aka result handler |
duke@435 | 77 | static address tosca_result_to_stack(int index) { return _tosca_to_stack[index]; } |
duke@435 | 78 | static address stack_result_to_stack(int index) { return _stack_to_stack[index]; } |
duke@435 | 79 | static address stack_result_to_native(int index) { return _stack_to_native_abi[index]; } |
duke@435 | 80 | |
duke@435 | 81 | static address return_entry (TosState state, int length); |
duke@435 | 82 | static address deopt_entry (TosState state, int length); |
duke@435 | 83 | |
stefank@2314 | 84 | #ifdef TARGET_ARCH_x86 |
stefank@2314 | 85 | # include "cppInterpreter_x86.hpp" |
stefank@2314 | 86 | #endif |
stefank@2314 | 87 | #ifdef TARGET_ARCH_sparc |
stefank@2314 | 88 | # include "cppInterpreter_sparc.hpp" |
stefank@2314 | 89 | #endif |
stefank@2314 | 90 | #ifdef TARGET_ARCH_zero |
stefank@2314 | 91 | # include "cppInterpreter_zero.hpp" |
stefank@2314 | 92 | #endif |
bobv@2508 | 93 | #ifdef TARGET_ARCH_arm |
bobv@2508 | 94 | # include "cppInterpreter_arm.hpp" |
bobv@2508 | 95 | #endif |
bobv@2508 | 96 | #ifdef TARGET_ARCH_ppc |
bobv@2508 | 97 | # include "cppInterpreter_ppc.hpp" |
bobv@2508 | 98 | #endif |
stefank@2314 | 99 | |
duke@435 | 100 | |
duke@435 | 101 | }; |
duke@435 | 102 | |
duke@435 | 103 | #endif // CC_INTERP |
stefank@2314 | 104 | |
stefank@2314 | 105 | #endif // SHARE_VM_INTERPRETER_CPPINTERPRETER_HPP |