1 /*
2 * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2024, Red Hat, Inc. All rights reserved.
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.
71 SHARED_JFR_STUBS_DO(do_blob) \
72
73 // C1 stubs are always generated in a generic CodeBlob
74
75 #ifdef COMPILER1
76 // do_blob(name)
77 #define C1_STUBS_DO(do_blob) \
78 do_blob(dtrace_object_alloc) \
79 do_blob(unwind_exception) \
80 do_blob(forward_exception) \
81 do_blob(throw_range_check_failed) /* throws ArrayIndexOutOfBoundsException */ \
82 do_blob(throw_index_exception) /* throws IndexOutOfBoundsException */ \
83 do_blob(throw_div0_exception) \
84 do_blob(throw_null_pointer_exception) \
85 do_blob(register_finalizer) \
86 do_blob(new_instance) \
87 do_blob(fast_new_instance) \
88 do_blob(fast_new_instance_init_check) \
89 do_blob(new_type_array) \
90 do_blob(new_object_array) \
91 do_blob(new_multi_array) \
92 do_blob(handle_exception_nofpu) /* optimized version that does not preserve fpu registers */ \
93 do_blob(handle_exception) \
94 do_blob(handle_exception_from_callee) \
95 do_blob(throw_array_store_exception) \
96 do_blob(throw_class_cast_exception) \
97 do_blob(throw_incompatible_class_change_error) \
98 do_blob(slow_subtype_check) \
99 do_blob(monitorenter) \
100 do_blob(monitorenter_nofpu) /* optimized version that does not preserve fpu registers */ \
101 do_blob(monitorexit) \
102 do_blob(monitorexit_nofpu) /* optimized version that does not preserve fpu registers */ \
103 do_blob(deoptimize) \
104 do_blob(access_field_patching) \
105 do_blob(load_klass_patching) \
106 do_blob(load_mirror_patching) \
107 do_blob(load_appendix_patching) \
108 do_blob(fpu2long_stub) \
109 do_blob(counter_overflow) \
110 do_blob(predicate_failed_trap) \
111
112 #else
113 #define C1_STUBS_DO(do_blob)
114 #endif
115
116 // Opto stubs can be stored as entries with just an address or as
117 // blobs of different types. The former may include some JVMTI stubs.
143 // and require access to TLS and the return pc. jvmti stubs always
144 // employ jump 0, and require no special access
145 #define C2_STUBS_DO(do_blob, do_stub, do_jvmti_stub) \
146 do_blob(uncommon_trap, UncommonTrapBlob*) \
147 do_blob(exception, ExceptionBlob*) \
148 do_stub(new_instance, 0, true, false) \
149 do_stub(new_array, 0, true, false) \
150 do_stub(new_array_nozero, 0, true, false) \
151 do_stub(multianewarray2, 0, true, false) \
152 do_stub(multianewarray3, 0, true, false) \
153 do_stub(multianewarray4, 0, true, false) \
154 do_stub(multianewarray5, 0, true, false) \
155 do_stub(multianewarrayN, 0, true, false) \
156 C2_JVMTI_STUBS_DO(do_jvmti_stub) \
157 do_stub(complete_monitor_locking, 0, false, false) \
158 do_stub(monitor_notify, 0, false, false) \
159 do_stub(monitor_notifyAll, 0, false, false) \
160 do_stub(rethrow, 2, true, true) \
161 do_stub(slow_arraycopy, 0, false, false) \
162 do_stub(register_finalizer, 0, false, false) \
163
164 #else
165 #define C2_STUBS_DO(do_blob, do_stub, do_jvmti_stub)
166 #endif
167
168 // generate a stub or blob id enum tag from a name
169
170 #define STUB_ID_NAME(base) base##_id
171
172 // generate a stub field name
173
174 #define STUB_FIELD_NAME(base) _##base
175
176 // generate a blob field name
177
178 #define BLOB_FIELD_NAME(base) _##base##_blob
179
180 #endif // SHARE_RUNTIME_STUBDECLARATIONS_HPP
181
|
1 /*
2 * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2024, Red Hat, Inc. All rights reserved.
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.
71 SHARED_JFR_STUBS_DO(do_blob) \
72
73 // C1 stubs are always generated in a generic CodeBlob
74
75 #ifdef COMPILER1
76 // do_blob(name)
77 #define C1_STUBS_DO(do_blob) \
78 do_blob(dtrace_object_alloc) \
79 do_blob(unwind_exception) \
80 do_blob(forward_exception) \
81 do_blob(throw_range_check_failed) /* throws ArrayIndexOutOfBoundsException */ \
82 do_blob(throw_index_exception) /* throws IndexOutOfBoundsException */ \
83 do_blob(throw_div0_exception) \
84 do_blob(throw_null_pointer_exception) \
85 do_blob(register_finalizer) \
86 do_blob(new_instance) \
87 do_blob(fast_new_instance) \
88 do_blob(fast_new_instance_init_check) \
89 do_blob(new_type_array) \
90 do_blob(new_object_array) \
91 do_blob(new_null_free_array) \
92 do_blob(new_multi_array) \
93 do_blob(load_flat_array) \
94 do_blob(store_flat_array) \
95 do_blob(substitutability_check) \
96 do_blob(buffer_inline_args) \
97 do_blob(buffer_inline_args_no_receiver) \
98 do_blob(handle_exception_nofpu) /* optimized version that does not preserve fpu registers */ \
99 do_blob(handle_exception) \
100 do_blob(handle_exception_from_callee) \
101 do_blob(throw_array_store_exception) \
102 do_blob(throw_class_cast_exception) \
103 do_blob(throw_incompatible_class_change_error) \
104 do_blob(throw_illegal_monitor_state_exception) \
105 do_blob(throw_identity_exception) \
106 do_blob(slow_subtype_check) \
107 do_blob(monitorenter) \
108 do_blob(monitorenter_nofpu) /* optimized version that does not preserve fpu registers */ \
109 do_blob(monitorexit) \
110 do_blob(monitorexit_nofpu) /* optimized version that does not preserve fpu registers */ \
111 do_blob(deoptimize) \
112 do_blob(access_field_patching) \
113 do_blob(load_klass_patching) \
114 do_blob(load_mirror_patching) \
115 do_blob(load_appendix_patching) \
116 do_blob(fpu2long_stub) \
117 do_blob(counter_overflow) \
118 do_blob(predicate_failed_trap) \
119
120 #else
121 #define C1_STUBS_DO(do_blob)
122 #endif
123
124 // Opto stubs can be stored as entries with just an address or as
125 // blobs of different types. The former may include some JVMTI stubs.
151 // and require access to TLS and the return pc. jvmti stubs always
152 // employ jump 0, and require no special access
153 #define C2_STUBS_DO(do_blob, do_stub, do_jvmti_stub) \
154 do_blob(uncommon_trap, UncommonTrapBlob*) \
155 do_blob(exception, ExceptionBlob*) \
156 do_stub(new_instance, 0, true, false) \
157 do_stub(new_array, 0, true, false) \
158 do_stub(new_array_nozero, 0, true, false) \
159 do_stub(multianewarray2, 0, true, false) \
160 do_stub(multianewarray3, 0, true, false) \
161 do_stub(multianewarray4, 0, true, false) \
162 do_stub(multianewarray5, 0, true, false) \
163 do_stub(multianewarrayN, 0, true, false) \
164 C2_JVMTI_STUBS_DO(do_jvmti_stub) \
165 do_stub(complete_monitor_locking, 0, false, false) \
166 do_stub(monitor_notify, 0, false, false) \
167 do_stub(monitor_notifyAll, 0, false, false) \
168 do_stub(rethrow, 2, true, true) \
169 do_stub(slow_arraycopy, 0, false, false) \
170 do_stub(register_finalizer, 0, false, false) \
171 do_stub(load_unknown_inline, 0, true, false) \
172 do_stub(store_unknown_inline, 0, true, false) \
173
174 #else
175 #define C2_STUBS_DO(do_blob, do_stub, do_jvmti_stub)
176 #endif
177
178 // generate a stub or blob id enum tag from a name
179
180 #define STUB_ID_NAME(base) base##_id
181
182 // generate a stub field name
183
184 #define STUB_FIELD_NAME(base) _##base
185
186 // generate a blob field name
187
188 #define BLOB_FIELD_NAME(base) _##base##_blob
189
190 #endif // SHARE_RUNTIME_STUBDECLARATIONS_HPP
191
|