duke@435: /* sla@5237: * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. duke@435: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: * duke@435: * This code is free software; you can redistribute it and/or modify it duke@435: * under the terms of the GNU General Public License version 2 only, as duke@435: * published by the Free Software Foundation. duke@435: * duke@435: * This code is distributed in the hope that it will be useful, but WITHOUT duke@435: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: * version 2 for more details (a copy is included in the LICENSE file that duke@435: * accompanied this code). duke@435: * duke@435: * You should have received a copy of the GNU General Public License version duke@435: * 2 along with this work; if not, write to the Free Software Foundation, duke@435: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: * trims@1907: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: * or visit www.oracle.com if you need additional information or have any trims@1907: * questions. duke@435: * duke@435: */ duke@435: stefank@2314: #ifndef SHARE_VM_RUNTIME_FRAME_INLINE_HPP stefank@2314: #define SHARE_VM_RUNTIME_FRAME_INLINE_HPP stefank@2314: stefank@2314: #include "interpreter/bytecodeInterpreter.hpp" stefank@2314: #include "interpreter/bytecodeInterpreter.inline.hpp" stefank@2314: #include "interpreter/interpreter.hpp" coleenp@4037: #include "oops/method.hpp" stefank@2314: #include "runtime/frame.hpp" stefank@2314: #include "runtime/signature.hpp" stefank@2314: #ifdef TARGET_ARCH_x86 stefank@2314: # include "jniTypes_x86.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_sparc stefank@2314: # include "jniTypes_sparc.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_zero stefank@2314: # include "jniTypes_zero.hpp" stefank@2314: #endif bobv@2508: #ifdef TARGET_ARCH_arm bobv@2508: # include "jniTypes_arm.hpp" bobv@2508: #endif bobv@2508: #ifdef TARGET_ARCH_ppc bobv@2508: # include "jniTypes_ppc.hpp" bobv@2508: #endif stefank@2314: #ifdef ZERO stefank@2314: #ifdef TARGET_ARCH_zero stefank@2314: # include "entryFrame_zero.hpp" stefank@2314: # include "fakeStubFrame_zero.hpp" stefank@2314: # include "interpreterFrame_zero.hpp" stefank@2314: # include "sharkFrame_zero.hpp" stefank@2314: #endif stefank@2314: #endif stefank@2314: twisti@1040: // This file holds platform-independent bodies of inline functions for frames. duke@435: duke@435: // Note: The bcx usually contains the bcp; however during GC it contains the bci coleenp@4037: // (changed by gc_prologue() and gc_epilogue()) to be Method* position duke@435: // independent. These accessors make sure the correct value is returned duke@435: // by testing the range of the bcx value. bcp's are guaranteed to be above duke@435: // max_method_code_size, since methods are always allocated in OldSpace and duke@435: // Eden is allocated before OldSpace. duke@435: // duke@435: // The bcp is accessed sometimes during GC for ArgumentDescriptors; than duke@435: // the correct translation has to be performed (was bug). duke@435: duke@435: inline bool frame::is_bci(intptr_t bcx) { duke@435: #ifdef _LP64 duke@435: return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ; duke@435: #else duke@435: return 0 <= bcx && bcx <= max_method_code_size; duke@435: #endif duke@435: } duke@435: duke@435: inline bool frame::is_entry_frame() const { duke@435: return StubRoutines::returns_to_call_stub(pc()); duke@435: } duke@435: sla@5237: inline bool frame::is_stub_frame() const { sla@5237: return StubRoutines::is_stub_code(pc()) || (_cb != NULL && _cb->is_adapter_blob()); sla@5237: } sla@5237: duke@435: inline bool frame::is_first_frame() const { duke@435: return is_entry_frame() && entry_frame_is_first(); duke@435: } duke@435: goetz@6521: #ifdef CC_INTERP goetz@6521: inline oop* frame::interpreter_frame_temp_oop_addr() const { goetz@6521: interpreterState istate = get_interpreterState(); goetz@6521: return (oop *)&istate->_oop_temp; goetz@6521: } goetz@6521: #endif // CC_INTERP goetz@6521: duke@435: // here are the platform-dependent bodies: duke@435: stefank@2314: #ifdef TARGET_ARCH_x86 stefank@2314: # include "frame_x86.inline.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_sparc stefank@2314: # include "frame_sparc.inline.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_zero stefank@2314: # include "frame_zero.inline.hpp" stefank@2314: #endif bobv@2508: #ifdef TARGET_ARCH_arm bobv@2508: # include "frame_arm.inline.hpp" bobv@2508: #endif bobv@2508: #ifdef TARGET_ARCH_ppc bobv@2508: # include "frame_ppc.inline.hpp" bobv@2508: #endif stefank@2314: stefank@2314: stefank@2314: #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP