src/cpu/x86/vm/vtableStubs_x86_32.cpp

Print this page


   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_x86_32.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 #ifndef PRODUCT
  34 extern "C" void bad_compiled_vtable_index(JavaThread* thread, oop receiver, int index);
  35 #endif
  36 
  37 // These stubs are used by the compiler only.
  38 // Argument registers, which must be preserved:
  39 //   rcx - receiver (always first argument)
  40 //   rdx - second argument (if any)
  41 // Other registers that might be usable:
  42 //   rax - inline cache register (is interface for itable stub)
  43 //   rbx - method (used when calling out to interpreter)
  44 // Available now, but may become callee-save at some point:
  45 //   rsi, rdi
  46 // Note that rax and rdx are also used for return values.


   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_x86.inline.hpp"
  28 #include "code/vtableStubs.hpp"
  29 #include "interp_masm_x86_32.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "oops/instanceKlass.hpp"
  32 #include "oops/klassVtable.hpp"
  33 #include "runtime/sharedRuntime.hpp"
  34 #include "vmreg_x86.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 #ifndef PRODUCT
  45 extern "C" void bad_compiled_vtable_index(JavaThread* thread, oop receiver, int index);
  46 #endif
  47 
  48 // These stubs are used by the compiler only.
  49 // Argument registers, which must be preserved:
  50 //   rcx - receiver (always first argument)
  51 //   rdx - second argument (if any)
  52 // Other registers that might be usable:
  53 //   rax - inline cache register (is interface for itable stub)
  54 //   rbx - method (used when calling out to interpreter)
  55 // Available now, but may become callee-save at some point:
  56 //   rsi, rdi
  57 // Note that rax and rdx are also used for return values.