5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 class StubAssembler; 26 27 // The Runtime1 holds all assembly stubs and VM 28 // runtime routines needed by code code generated 29 // by the Compiler1. 30 31 #define RUNTIME1_STUBS(stub, last_entry) \ 32 stub(dtrace_object_alloc) \ 33 stub(unwind_exception) \ 34 stub(forward_exception) \ 35 stub(throw_range_check_failed) /* throws ArrayIndexOutOfBoundsException */ \ 36 stub(throw_index_exception) /* throws IndexOutOfBoundsException */ \ 37 stub(throw_div0_exception) \ 38 stub(throw_null_pointer_exception) \ 39 stub(register_finalizer) \ 40 stub(new_instance) \ 41 stub(fast_new_instance) \ 42 stub(fast_new_instance_init_check) \ 43 stub(new_type_array) \ 44 stub(new_object_array) \ 157 static const char* name_for (StubID id); 158 static const char* name_for_address(address entry); 159 160 // platform might add runtime names. 161 static const char* pd_name_for_address(address entry); 162 163 // method tracing 164 static void trace_block_entry(jint block_id); 165 166 #ifndef PRODUCT 167 static address throw_count_address() { return (address)&_throw_count; } 168 #endif 169 170 // directly accessible leaf routine 171 static int arraycopy(oopDesc* src, int src_pos, oopDesc* dst, int dst_pos, int length); 172 static void primitive_arraycopy(HeapWord* src, HeapWord* dst, int length); 173 static void oop_arraycopy(HeapWord* src, HeapWord* dst, int length); 174 175 static void print_statistics() PRODUCT_RETURN; 176 }; | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_C1_C1_RUNTIME1_HPP 26 #define SHARE_VM_C1_C1_RUNTIME1_HPP 27 28 #include "c1/c1_FrameMap.hpp" 29 #include "code/stubs.hpp" 30 #include "interpreter/interpreter.hpp" 31 #include "memory/allocation.hpp" 32 #include "runtime/deoptimization.hpp" 33 34 class StubAssembler; 35 36 // The Runtime1 holds all assembly stubs and VM 37 // runtime routines needed by code code generated 38 // by the Compiler1. 39 40 #define RUNTIME1_STUBS(stub, last_entry) \ 41 stub(dtrace_object_alloc) \ 42 stub(unwind_exception) \ 43 stub(forward_exception) \ 44 stub(throw_range_check_failed) /* throws ArrayIndexOutOfBoundsException */ \ 45 stub(throw_index_exception) /* throws IndexOutOfBoundsException */ \ 46 stub(throw_div0_exception) \ 47 stub(throw_null_pointer_exception) \ 48 stub(register_finalizer) \ 49 stub(new_instance) \ 50 stub(fast_new_instance) \ 51 stub(fast_new_instance_init_check) \ 52 stub(new_type_array) \ 53 stub(new_object_array) \ 166 static const char* name_for (StubID id); 167 static const char* name_for_address(address entry); 168 169 // platform might add runtime names. 170 static const char* pd_name_for_address(address entry); 171 172 // method tracing 173 static void trace_block_entry(jint block_id); 174 175 #ifndef PRODUCT 176 static address throw_count_address() { return (address)&_throw_count; } 177 #endif 178 179 // directly accessible leaf routine 180 static int arraycopy(oopDesc* src, int src_pos, oopDesc* dst, int dst_pos, int length); 181 static void primitive_arraycopy(HeapWord* src, HeapWord* dst, int length); 182 static void oop_arraycopy(HeapWord* src, HeapWord* dst, int length); 183 184 static void print_statistics() PRODUCT_RETURN; 185 }; 186 187 #endif // SHARE_VM_C1_C1_RUNTIME1_HPP |