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