sharedRuntime_zero.cpp revision 6010:abec000618bf
122514Sdarrenr/* 222514Sdarrenr * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 322514Sdarrenr * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. 422514Sdarrenr * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 522514Sdarrenr * 622514Sdarrenr * This code is free software; you can redistribute it and/or modify it 722514Sdarrenr * under the terms of the GNU General Public License version 2 only, as 822514Sdarrenr * published by the Free Software Foundation. 922514Sdarrenr * 1022514Sdarrenr * This code is distributed in the hope that it will be useful, but WITHOUT 1122514Sdarrenr * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1222514Sdarrenr * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1322514Sdarrenr * version 2 for more details (a copy is included in the LICENSE file that 1422514Sdarrenr * accompanied this code). 1522514Sdarrenr * 1622514Sdarrenr * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 * 24 */ 25 26#include "precompiled.hpp" 27#include "asm/assembler.hpp" 28#include "assembler_zero.inline.hpp" 29#include "code/debugInfoRec.hpp" 30#include "code/icBuffer.hpp" 31#include "code/vtableStubs.hpp" 32#include "interpreter/interpreter.hpp" 33#include "oops/compiledICHolder.hpp" 34#include "prims/jvmtiRedefineClassesTrace.hpp" 35#include "runtime/sharedRuntime.hpp" 36#include "runtime/vframeArray.hpp" 37#include "vmreg_zero.inline.hpp" 38 39#ifdef COMPILER1 40#include "c1/c1_Runtime1.hpp" 41#endif 42#ifdef COMPILER2 43#include "opto/runtime.hpp" 44#endif 45#ifdef SHARK 46#include "compiler/compileBroker.hpp" 47#include "shark/sharkCompiler.hpp" 48#endif 49 50 51 52static address zero_null_code_stub() { 53 address start = ShouldNotCallThisStub(); 54 return start; 55} 56 57int SharedRuntime::java_calling_convention(const BasicType *sig_bt, 58 VMRegPair *regs, 59 int total_args_passed, 60 int is_outgoing) { 61 return 0; 62} 63 64AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters( 65 MacroAssembler *masm, 66 int total_args_passed, 67 int comp_args_on_stack, 68 const BasicType *sig_bt, 69 const VMRegPair *regs, 70 AdapterFingerPrint *fingerprint) { 71 return AdapterHandlerLibrary::new_entry( 72 fingerprint, 73 CAST_FROM_FN_PTR(address,zero_null_code_stub), 74 CAST_FROM_FN_PTR(address,zero_null_code_stub), 75 CAST_FROM_FN_PTR(address,zero_null_code_stub)); 76} 77 78nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, 79 methodHandle method, 80 int compile_id, 81 BasicType *sig_bt, 82 VMRegPair *regs, 83 BasicType ret_type) { 84#ifdef SHARK 85 return SharkCompiler::compiler()->generate_native_wrapper(masm, 86 method, 87 compile_id, 88 sig_bt, 89 ret_type); 90#else 91 ShouldNotCallThis(); 92 return NULL; 93#endif // SHARK 94} 95 96int Deoptimization::last_frame_adjust(int callee_parameters, 97 int callee_locals) { 98 return 0; 99} 100 101uint SharedRuntime::out_preserve_stack_slots() { 102 ShouldNotCallThis(); 103 return 0; 104} 105 106JRT_LEAF(void, zero_stub()) 107 ShouldNotCallThis(); 108JRT_END 109 110static RuntimeStub* generate_empty_runtime_stub(const char* name) { 111 return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub); 112} 113 114static SafepointBlob* generate_empty_safepoint_blob() { 115 return CAST_FROM_FN_PTR(SafepointBlob*,zero_stub); 116} 117 118static DeoptimizationBlob* generate_empty_deopt_blob() { 119 return CAST_FROM_FN_PTR(DeoptimizationBlob*,zero_stub); 120} 121 122 123void SharedRuntime::generate_deopt_blob() { 124 _deopt_blob = generate_empty_deopt_blob(); 125} 126 127SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) { 128 return generate_empty_safepoint_blob(); 129} 130 131RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) { 132 return generate_empty_runtime_stub("resolve_blob"); 133} 134 135 136int SharedRuntime::c_calling_convention(const BasicType *sig_bt, 137 VMRegPair *regs, 138 VMRegPair *regs2, 139 int total_args_passed) { 140 ShouldNotCallThis(); 141 return 0; 142} 143