src/cpu/zero/vm/stubGenerator_zero.cpp

Print this page


   1 /*
   2  * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2007, 2008, 2010 Red Hat, Inc.
   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.
  23  *
  24  */
  25 
  26 #include "incls/_precompiled.incl"
  27 #include "incls/_stubGenerator_zero.cpp.incl"





















  28 
  29 // Declaration and definition of StubGenerator (no .hpp file).
  30 // For a more detailed description of the stub routine structure
  31 // see the comment in stubRoutines.hpp
  32 
  33 class StubGenerator: public StubCodeGenerator {
  34  private:
  35   // The call stub is used to call Java from C
  36   static void call_stub(
  37     JavaCallWrapper *call_wrapper,
  38     intptr_t*        result,
  39     BasicType        result_type,
  40     methodOop        method,
  41     address          entry_point,
  42     intptr_t*        parameters,
  43     int              parameter_words,
  44     TRAPS) {
  45     JavaThread *thread = (JavaThread *) THREAD;
  46     ZeroStack *stack = thread->zero_stack();
  47 


   1 /*
   2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2007, 2008, 2010 Red Hat, Inc.
   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.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/assembler.hpp"
  28 #include "assembler_zero.inline.hpp"
  29 #include "interpreter/interpreter.hpp"
  30 #include "nativeInst_zero.hpp"
  31 #include "oops/instanceOop.hpp"
  32 #include "oops/methodOop.hpp"
  33 #include "oops/objArrayKlass.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "prims/methodHandles.hpp"
  36 #include "runtime/frame.inline.hpp"
  37 #include "runtime/handles.inline.hpp"
  38 #include "runtime/sharedRuntime.hpp"
  39 #include "runtime/stubCodeGenerator.hpp"
  40 #include "runtime/stubRoutines.hpp"
  41 #include "stack_zero.inline.hpp"
  42 #include "utilities/top.hpp"
  43 #ifdef TARGET_OS_FAMILY_linux
  44 # include "thread_linux.inline.hpp"
  45 #endif
  46 #ifdef COMPILER2
  47 #include "opto/runtime.hpp"
  48 #endif
  49 
  50 // Declaration and definition of StubGenerator (no .hpp file).
  51 // For a more detailed description of the stub routine structure
  52 // see the comment in stubRoutines.hpp
  53 
  54 class StubGenerator: public StubCodeGenerator {
  55  private:
  56   // The call stub is used to call Java from C
  57   static void call_stub(
  58     JavaCallWrapper *call_wrapper,
  59     intptr_t*        result,
  60     BasicType        result_type,
  61     methodOop        method,
  62     address          entry_point,
  63     intptr_t*        parameters,
  64     int              parameter_words,
  65     TRAPS) {
  66     JavaThread *thread = (JavaThread *) THREAD;
  67     ZeroStack *stack = thread->zero_stack();
  68