never@1445: /* stefank@2314: * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. twisti@2729: * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. never@1445: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. never@1445: * never@1445: * This code is free software; you can redistribute it and/or modify it never@1445: * under the terms of the GNU General Public License version 2 only, as never@1445: * published by the Free Software Foundation. never@1445: * never@1445: * This code is distributed in the hope that it will be useful, but WITHOUT never@1445: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or never@1445: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License never@1445: * version 2 for more details (a copy is included in the LICENSE file that never@1445: * accompanied this code). never@1445: * never@1445: * You should have received a copy of the GNU General Public License version never@1445: * 2 along with this work; if not, write to the Free Software Foundation, never@1445: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. never@1445: * 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. never@1445: * never@1445: */ never@1445: stefank@2314: #include "precompiled.hpp" stefank@2314: #include "asm/assembler.hpp" stefank@2314: #include "assembler_zero.inline.hpp" stefank@2314: #include "code/debugInfoRec.hpp" stefank@2314: #include "code/icBuffer.hpp" stefank@2314: #include "code/vtableStubs.hpp" stefank@2314: #include "interpreter/interpreter.hpp" stefank@2314: #include "oops/compiledICHolderOop.hpp" stefank@2314: #include "prims/jvmtiRedefineClassesTrace.hpp" stefank@2314: #include "runtime/sharedRuntime.hpp" stefank@2314: #include "runtime/vframeArray.hpp" stefank@2314: #include "vmreg_zero.inline.hpp" stefank@2314: #ifdef COMPILER1 stefank@2314: #include "c1/c1_Runtime1.hpp" stefank@2314: #endif stefank@2314: #ifdef COMPILER2 stefank@2314: #include "opto/runtime.hpp" stefank@2314: #endif stefank@2314: #ifdef SHARK stefank@2314: #include "compiler/compileBroker.hpp" stefank@2314: #include "shark/sharkCompiler.hpp" stefank@2314: #endif never@1445: never@1445: DeoptimizationBlob *SharedRuntime::_deopt_blob; never@1445: SafepointBlob *SharedRuntime::_polling_page_safepoint_handler_blob; never@1445: SafepointBlob *SharedRuntime::_polling_page_return_handler_blob; never@1445: RuntimeStub *SharedRuntime::_wrong_method_blob; never@1445: RuntimeStub *SharedRuntime::_ic_miss_blob; never@1445: RuntimeStub *SharedRuntime::_resolve_opt_virtual_call_blob; never@1445: RuntimeStub *SharedRuntime::_resolve_virtual_call_blob; never@1445: RuntimeStub *SharedRuntime::_resolve_static_call_blob; never@1445: never@1445: int SharedRuntime::java_calling_convention(const BasicType *sig_bt, never@1445: VMRegPair *regs, never@1445: int total_args_passed, never@1445: int is_outgoing) { never@1445: return 0; never@1445: } never@1445: never@1445: AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters( never@1445: MacroAssembler *masm, never@1445: int total_args_passed, never@1445: int comp_args_on_stack, never@1445: const BasicType *sig_bt, twisti@1632: const VMRegPair *regs, twisti@1632: AdapterFingerPrint *fingerprint) { twisti@1632: return AdapterHandlerLibrary::new_entry( twisti@1632: fingerprint, never@1445: ShouldNotCallThisStub(), never@1445: ShouldNotCallThisStub(), never@1445: ShouldNotCallThisStub()); never@1445: } never@1445: never@1445: nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, never@1445: methodHandle method, twisti@2729: int compile_id, twisti@2729: int total_args_passed, twisti@2729: int max_arg, twisti@2729: BasicType *sig_bt, twisti@2729: VMRegPair *regs, never@1445: BasicType ret_type) { twisti@1513: #ifdef SHARK twisti@1513: return SharkCompiler::compiler()->generate_native_wrapper(masm, twisti@1513: method, twisti@2729: compile_id, twisti@2729: sig_bt, twisti@1513: ret_type); twisti@1513: #else never@1445: ShouldNotCallThis(); twisti@1513: #endif // SHARK never@1445: } never@1445: never@1445: int Deoptimization::last_frame_adjust(int callee_parameters, never@1445: int callee_locals) { never@1445: return 0; never@1445: } never@1445: never@1445: uint SharedRuntime::out_preserve_stack_slots() { never@1445: ShouldNotCallThis(); never@1445: } never@1445: never@1445: static RuntimeStub* generate_empty_runtime_stub(const char* name) { never@1445: CodeBuffer buffer(name, 0, 0); never@1445: return RuntimeStub::new_runtime_stub(name, &buffer, 0, 0, NULL, false); never@1445: } never@1445: never@1445: static SafepointBlob* generate_empty_safepoint_blob() { never@1445: CodeBuffer buffer("handler_blob", 0, 0); never@1445: return SafepointBlob::create(&buffer, NULL, 0); never@1445: } never@1445: never@1445: void SharedRuntime::generate_stubs() { never@1445: _wrong_method_blob = never@1445: generate_empty_runtime_stub("wrong_method_stub"); never@1445: _ic_miss_blob = never@1445: generate_empty_runtime_stub("ic_miss_stub"); never@1445: _resolve_opt_virtual_call_blob = never@1445: generate_empty_runtime_stub("resolve_opt_virtual_call"); never@1445: _resolve_virtual_call_blob = never@1445: generate_empty_runtime_stub("resolve_virtual_call"); never@1445: _resolve_static_call_blob = never@1445: generate_empty_runtime_stub("resolve_static_call"); never@1445: never@1445: _polling_page_safepoint_handler_blob = never@1445: generate_empty_safepoint_blob(); never@1445: _polling_page_return_handler_blob = never@1445: generate_empty_safepoint_blob(); never@1445: } never@1445: never@1445: int SharedRuntime::c_calling_convention(const BasicType *sig_bt, never@1445: VMRegPair *regs, never@1445: int total_args_passed) { never@1445: ShouldNotCallThis(); never@1445: }