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 int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
 42                                            VMRegPair *regs,
 43                                            int total_args_passed) {
 44   return 0;
 45 }
 46 
 47 void SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
 48                                             int total_args_passed,
 49                                             int comp_args_on_stack,
 50                                             const BasicType *sig_bt,
 51                                             const VMRegPair *regs,
 52                                             address entry_address[AdapterBlob::ENTRY_COUNT]) {
 53   ShouldNotCallThis();
 54   return;
 55 }
 56 
 57 nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
 58                                                 const methodHandle& method,
 59                                                 int compile_id,
 60                                                 BasicType *sig_bt,
 61                                                 VMRegPair *regs,
 62                                                 BasicType ret_type) {
 63   ShouldNotCallThis();
 64   return nullptr;
 65 }
 66 
 67 int Deoptimization::last_frame_adjust(int callee_parameters,
 68                                       int callee_locals) {
 69   return 0;
 70 }
 71 
 72 uint SharedRuntime::out_preserve_stack_slots() {
 73   ShouldNotCallThis();
 74   return 0;
 75 }
 76 
 77 VMReg SharedRuntime::thread_register() {
 78   Unimplemented();
 79   return nullptr;
 80 }
 81 
 82 JRT_LEAF(void, zero_stub())
 83   ShouldNotCallThis();
 84 JRT_END
 85 
 86 static RuntimeStub* generate_empty_runtime_stub() {
 87   return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub);
 88 }
 89 
 90 static SafepointBlob* generate_empty_safepoint_blob() {
 91   return CAST_FROM_FN_PTR(SafepointBlob*,zero_stub);
 92 }
 93 
 94 static DeoptimizationBlob* generate_empty_deopt_blob() {
 95   return CAST_FROM_FN_PTR(DeoptimizationBlob*,zero_stub);
 96 }
 97 
 98 void SharedRuntime::generate_deopt_blob() {
 99   _deopt_blob = generate_empty_deopt_blob();
100 }
101 
102 SafepointBlob* SharedRuntime::generate_handler_blob(StubId id, address call_ptr) {
103   return generate_empty_safepoint_blob();
104 }
105 
106 RuntimeStub* SharedRuntime::generate_resolve_blob(StubId id, address destination) {
107   return generate_empty_runtime_stub();
108 }
109 
110 RuntimeStub* SharedRuntime::generate_throw_exception(StubId id, address runtime_entry) {
111   return generate_empty_runtime_stub();
112 }
113 
114 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
115                                          VMRegPair *regs,
116                                          int total_args_passed) {
117   ShouldNotCallThis();
118   return 0;
119 }
120 
121 int SharedRuntime::vector_calling_convention(VMRegPair *regs,
122                                              uint num_bits,
123                                              uint total_args_passed) {
124   ShouldNotCallThis();
125   return 0;
126 }
127 
128 #if INCLUDE_JFR
129 RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
130   return nullptr;
131 }
132 
133 RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
134   return nullptr;
135 }
136 
137 #endif // INCLUDE_JFR
138