1 /* 2 * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. 3 * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. 9 * 10 * This code is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * 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 "asm/assembler.inline.hpp" 27 #include "code/debugInfoRec.hpp" 28 #include "code/vtableStubs.hpp" 29 #include "interpreter/interpreter.hpp" 30 #include "runtime/interfaceSupport.inline.hpp" 31 #include "runtime/sharedRuntime.hpp" 32 #include "runtime/vframeArray.hpp" 33 #include "vmreg_zero.inline.hpp" 34 #ifdef COMPILER1 35 #include "c1/c1_Runtime1.hpp" 36 #endif 37 #ifdef COMPILER2 38 #include "opto/runtime.hpp" 39 #endif 40 41 42 static address zero_null_code_stub() { 43 address start = ShouldNotCallThisStub(); 44 return start; 45 } 46 47 int SharedRuntime::java_calling_convention(const BasicType *sig_bt, 48 VMRegPair *regs, 49 int total_args_passed) { 50 return 0; 51 } 52 53 AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters( 54 MacroAssembler *masm, 55 int total_args_passed, 56 int comp_args_on_stack, 57 const BasicType *sig_bt, 58 const VMRegPair *regs, 59 AdapterFingerPrint *fingerprint) { 60 return AdapterHandlerLibrary::new_entry( 61 fingerprint, 62 CAST_FROM_FN_PTR(address,zero_null_code_stub), 63 CAST_FROM_FN_PTR(address,zero_null_code_stub), 64 CAST_FROM_FN_PTR(address,zero_null_code_stub)); 65 } 66 67 nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, 68 const methodHandle& method, 69 int compile_id, 70 BasicType *sig_bt, 71 VMRegPair *regs, 72 BasicType ret_type) { 73 ShouldNotCallThis(); 74 return nullptr; 75 } 76 77 int Deoptimization::last_frame_adjust(int callee_parameters, 78 int callee_locals) { 79 return 0; 80 } 81 82 uint SharedRuntime::out_preserve_stack_slots() { 83 ShouldNotCallThis(); 84 return 0; 85 } 86 87 VMReg SharedRuntime::thread_register() { 88 Unimplemented(); 89 return nullptr; 90 } 91 92 JRT_LEAF(void, zero_stub()) 93 ShouldNotCallThis(); 94 JRT_END 95 96 static RuntimeStub* generate_empty_runtime_stub() { 97 return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub); 98 } 99 100 static SafepointBlob* generate_empty_safepoint_blob() { 101 return CAST_FROM_FN_PTR(SafepointBlob*,zero_stub); 102 } 103 104 static DeoptimizationBlob* generate_empty_deopt_blob() { 105 return CAST_FROM_FN_PTR(DeoptimizationBlob*,zero_stub); 106 } 107 108 void SharedRuntime::generate_deopt_blob() { 109 _deopt_blob = generate_empty_deopt_blob(); 110 } 111 112 SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address call_ptr) { 113 return generate_empty_safepoint_blob(); 114 } 115 116 RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address destination) { 117 return generate_empty_runtime_stub(); 118 } 119 120 RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address runtime_entry) { 121 return generate_empty_runtime_stub(); 122 } 123 124 int SharedRuntime::c_calling_convention(const BasicType *sig_bt, 125 VMRegPair *regs, 126 int total_args_passed) { 127 ShouldNotCallThis(); 128 return 0; 129 } 130 131 int SharedRuntime::vector_calling_convention(VMRegPair *regs, 132 uint num_bits, 133 uint total_args_passed) { 134 ShouldNotCallThis(); 135 return 0; 136 } 137 138 #if INCLUDE_JFR 139 RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() { 140 return nullptr; 141 } 142 143 RuntimeStub* SharedRuntime::generate_jfr_return_lease() { 144 return nullptr; 145 } 146 147 #endif // INCLUDE_JFR 148