1 /* 2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 #include "incls/_precompiled.incl" 26 #include "incls/_vtableStubs_sparc.cpp.incl" 27 28 // machine-dependent part of VtableStubs: create vtableStub of correct size and 29 // initialize its code 30 31 #define __ masm-> 32 33 34 #ifndef PRODUCT 35 extern "C" void bad_compiled_vtable_index(JavaThread* thread, oopDesc* receiver, int index); 36 #endif 37 38 39 // Used by compiler only; may use only caller saved, non-argument registers 40 // NOTE: %%%% if any change is made to this stub make sure that the function 41 // pd_code_size_limit is changed to ensure the correct size for VtableStub 42 VtableStub* VtableStubs::create_vtable_stub(int vtable_index) { 43 const int sparc_code_length = VtableStub::pd_code_size_limit(true); 44 VtableStub* s = new(sparc_code_length) VtableStub(true, vtable_index); 45 ResourceMark rm; 46 CodeBuffer cb(s->entry_point(), sparc_code_length); | 1 /* 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 #include "precompiled.hpp" 26 #include "asm/assembler.hpp" 27 #include "assembler_sparc.inline.hpp" 28 #include "code/vtableStubs.hpp" 29 #include "interp_masm_sparc.hpp" 30 #include "memory/resourceArea.hpp" 31 #include "oops/instanceKlass.hpp" 32 #include "oops/klassVtable.hpp" 33 #include "runtime/sharedRuntime.hpp" 34 #include "vmreg_sparc.inline.hpp" 35 #ifdef COMPILER2 36 #include "opto/runtime.hpp" 37 #endif 38 39 // machine-dependent part of VtableStubs: create vtableStub of correct size and 40 // initialize its code 41 42 #define __ masm-> 43 44 45 #ifndef PRODUCT 46 extern "C" void bad_compiled_vtable_index(JavaThread* thread, oopDesc* receiver, int index); 47 #endif 48 49 50 // Used by compiler only; may use only caller saved, non-argument registers 51 // NOTE: %%%% if any change is made to this stub make sure that the function 52 // pd_code_size_limit is changed to ensure the correct size for VtableStub 53 VtableStub* VtableStubs::create_vtable_stub(int vtable_index) { 54 const int sparc_code_length = VtableStub::pd_code_size_limit(true); 55 VtableStub* s = new(sparc_code_length) VtableStub(true, vtable_index); 56 ResourceMark rm; 57 CodeBuffer cb(s->entry_point(), sparc_code_length); |