src/cpu/sparc/vm/c1_Runtime1_sparc.cpp

Print this page




   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/_c1_Runtime1_sparc.cpp.incl"












  27 
  28 // Implementation of StubAssembler
  29 
  30 int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address entry_point, int number_of_arguments) {
  31   // for sparc changing the number of arguments doesn't change
  32   // anything about the frame size so we'll always lie and claim that
  33   // we are only passing 1 argument.
  34   set_num_rt_args(1);
  35 
  36   assert_not_delayed();
  37   // bang stack before going to runtime
  38   set(-os::vm_page_size() + STACK_BIAS, G3_scratch);
  39   st(G0, SP, G3_scratch);
  40 
  41   // debugging support
  42   assert(number_of_arguments >= 0   , "cannot have negative number of arguments");
  43 
  44   set_last_Java_frame(SP, noreg);
  45   if (VerifyThread)  mov(G2_thread, O0); // about to be smashed; pass early
  46   save_thread(L7_thread_cache);




   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 "c1/c1_Defs.hpp"
  27 #include "c1/c1_MacroAssembler.hpp"
  28 #include "c1/c1_Runtime1.hpp"
  29 #include "interpreter/interpreter.hpp"
  30 #include "nativeInst_sparc.hpp"
  31 #include "oops/compiledICHolderOop.hpp"
  32 #include "oops/oop.inline.hpp"
  33 #include "prims/jvmtiExport.hpp"
  34 #include "register_sparc.hpp"
  35 #include "runtime/sharedRuntime.hpp"
  36 #include "runtime/signature.hpp"
  37 #include "runtime/vframeArray.hpp"
  38 #include "vmreg_sparc.inline.hpp"
  39 
  40 // Implementation of StubAssembler
  41 
  42 int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address entry_point, int number_of_arguments) {
  43   // for sparc changing the number of arguments doesn't change
  44   // anything about the frame size so we'll always lie and claim that
  45   // we are only passing 1 argument.
  46   set_num_rt_args(1);
  47 
  48   assert_not_delayed();
  49   // bang stack before going to runtime
  50   set(-os::vm_page_size() + STACK_BIAS, G3_scratch);
  51   st(G0, SP, G3_scratch);
  52 
  53   // debugging support
  54   assert(number_of_arguments >= 0   , "cannot have negative number of arguments");
  55 
  56   set_last_Java_frame(SP, noreg);
  57   if (VerifyThread)  mov(G2_thread, O0); // about to be smashed; pass early
  58   save_thread(L7_thread_cache);