< prev index next >

src/share/vm/runtime/stubRoutines.hpp

Print this page




  29 #include "memory/allocation.hpp"
  30 #include "runtime/frame.hpp"
  31 #include "runtime/mutexLocker.hpp"
  32 #include "runtime/stubCodeGenerator.hpp"
  33 #include "utilities/top.hpp"
  34 #ifdef TARGET_ARCH_x86
  35 # include "nativeInst_x86.hpp"
  36 #endif
  37 #ifdef TARGET_ARCH_sparc
  38 # include "nativeInst_sparc.hpp"
  39 #endif
  40 #ifdef TARGET_ARCH_zero
  41 # include "nativeInst_zero.hpp"
  42 #endif
  43 #ifdef TARGET_ARCH_arm
  44 # include "nativeInst_arm.hpp"
  45 #endif
  46 #ifdef TARGET_ARCH_ppc
  47 # include "nativeInst_ppc.hpp"
  48 #endif



  49 
  50 // StubRoutines provides entry points to assembly routines used by
  51 // compiled code and the run-time system. Platform-specific entry
  52 // points are defined in the platform-specific inner class.
  53 //
  54 // Class scheme:
  55 //
  56 //    platform-independent               platform-dependent
  57 //
  58 //    stubRoutines.hpp  <-- included --  stubRoutines_<arch>.hpp
  59 //           ^                                  ^
  60 //           |                                  |
  61 //       implements                         implements
  62 //           |                                  |
  63 //           |                                  |
  64 //    stubRoutines.cpp                   stubRoutines_<arch>.cpp
  65 //    stubRoutines_<os_family>.cpp       stubGenerator_<arch>.cpp
  66 //    stubRoutines_<os_arch>.cpp
  67 //
  68 // Note 1: The important thing is a clean decoupling between stub


  82 // Scheme for adding a new entry point:
  83 //
  84 // 1. determine if it's a platform-dependent or independent entry point
  85 //    a) if platform independent: make subsequent changes in the independent files
  86 //    b) if platform   dependent: make subsequent changes in the   dependent files
  87 // 2. add a private instance variable holding the entry point address
  88 // 3. add a public accessor function to the instance variable
  89 // 4. implement the corresponding generator function in the platform-dependent
  90 //    stubGenerator_<arch>.cpp file and call the function in generate_all() of that file
  91 
  92 
  93 class StubRoutines: AllStatic {
  94 
  95  public:
  96   enum platform_independent_constants {
  97     max_size_of_parameters = 256                           // max. parameter size supported by megamorphic lookups
  98   };
  99 
 100   // Dependencies
 101   friend class StubGenerator;

 102 #if defined STUBROUTINES_MD_HPP
 103 # include STUBROUTINES_MD_HPP
 104 #elif defined TARGET_ARCH_MODEL_x86_32
 105 # include "stubRoutines_x86_32.hpp"
 106 #elif defined TARGET_ARCH_MODEL_x86_64
 107 # include "stubRoutines_x86_64.hpp"
 108 #elif defined TARGET_ARCH_MODEL_sparc
 109 # include "stubRoutines_sparc.hpp"
 110 #elif defined TARGET_ARCH_MODEL_zero
 111 # include "stubRoutines_zero.hpp"
 112 #elif defined TARGET_ARCH_MODEL_ppc_64
 113 # include "stubRoutines_ppc_64.hpp"


 114 #endif
 115 
 116   static jint    _verify_oop_count;
 117   static address _verify_oop_subroutine_entry;
 118 
 119   static address _call_stub_return_address;                // the return PC, when returning to a call stub
 120   static address _call_stub_entry;
 121   static address _forward_exception_entry;
 122   static address _catch_exception_entry;
 123   static address _throw_AbstractMethodError_entry;
 124   static address _throw_IncompatibleClassChangeError_entry;
 125   static address _throw_NullPointerException_at_call_entry;
 126   static address _throw_StackOverflowError_entry;
 127   static address _handler_for_unsafe_access_entry;
 128 
 129   static address _atomic_xchg_entry;
 130   static address _atomic_xchg_ptr_entry;
 131   static address _atomic_store_entry;
 132   static address _atomic_store_ptr_entry;
 133   static address _atomic_cmpxchg_entry;




  29 #include "memory/allocation.hpp"
  30 #include "runtime/frame.hpp"
  31 #include "runtime/mutexLocker.hpp"
  32 #include "runtime/stubCodeGenerator.hpp"
  33 #include "utilities/top.hpp"
  34 #ifdef TARGET_ARCH_x86
  35 # include "nativeInst_x86.hpp"
  36 #endif
  37 #ifdef TARGET_ARCH_sparc
  38 # include "nativeInst_sparc.hpp"
  39 #endif
  40 #ifdef TARGET_ARCH_zero
  41 # include "nativeInst_zero.hpp"
  42 #endif
  43 #ifdef TARGET_ARCH_arm
  44 # include "nativeInst_arm.hpp"
  45 #endif
  46 #ifdef TARGET_ARCH_ppc
  47 # include "nativeInst_ppc.hpp"
  48 #endif
  49 #ifdef TARGET_ARCH_aarch32
  50 # include "nativeInst_aarch32.hpp"
  51 #endif
  52 
  53 // StubRoutines provides entry points to assembly routines used by
  54 // compiled code and the run-time system. Platform-specific entry
  55 // points are defined in the platform-specific inner class.
  56 //
  57 // Class scheme:
  58 //
  59 //    platform-independent               platform-dependent
  60 //
  61 //    stubRoutines.hpp  <-- included --  stubRoutines_<arch>.hpp
  62 //           ^                                  ^
  63 //           |                                  |
  64 //       implements                         implements
  65 //           |                                  |
  66 //           |                                  |
  67 //    stubRoutines.cpp                   stubRoutines_<arch>.cpp
  68 //    stubRoutines_<os_family>.cpp       stubGenerator_<arch>.cpp
  69 //    stubRoutines_<os_arch>.cpp
  70 //
  71 // Note 1: The important thing is a clean decoupling between stub


  85 // Scheme for adding a new entry point:
  86 //
  87 // 1. determine if it's a platform-dependent or independent entry point
  88 //    a) if platform independent: make subsequent changes in the independent files
  89 //    b) if platform   dependent: make subsequent changes in the   dependent files
  90 // 2. add a private instance variable holding the entry point address
  91 // 3. add a public accessor function to the instance variable
  92 // 4. implement the corresponding generator function in the platform-dependent
  93 //    stubGenerator_<arch>.cpp file and call the function in generate_all() of that file
  94 
  95 
  96 class StubRoutines: AllStatic {
  97 
  98  public:
  99   enum platform_independent_constants {
 100     max_size_of_parameters = 256                           // max. parameter size supported by megamorphic lookups
 101   };
 102 
 103   // Dependencies
 104   friend class StubGenerator;
 105 
 106 #if defined STUBROUTINES_MD_HPP
 107 # include STUBROUTINES_MD_HPP
 108 #elif defined TARGET_ARCH_MODEL_x86_32
 109 # include "stubRoutines_x86_32.hpp"
 110 #elif defined TARGET_ARCH_MODEL_x86_64
 111 # include "stubRoutines_x86_64.hpp"
 112 #elif defined TARGET_ARCH_MODEL_sparc
 113 # include "stubRoutines_sparc.hpp"
 114 #elif defined TARGET_ARCH_MODEL_zero
 115 # include "stubRoutines_zero.hpp"
 116 #elif defined TARGET_ARCH_MODEL_ppc_64
 117 # include "stubRoutines_ppc_64.hpp"
 118 #elif defined TARGET_ARCH_MODEL_aarch32
 119 # include "stubRoutines_aarch32.hpp"
 120 #endif
 121 
 122   static jint    _verify_oop_count;
 123   static address _verify_oop_subroutine_entry;
 124 
 125   static address _call_stub_return_address;                // the return PC, when returning to a call stub
 126   static address _call_stub_entry;
 127   static address _forward_exception_entry;
 128   static address _catch_exception_entry;
 129   static address _throw_AbstractMethodError_entry;
 130   static address _throw_IncompatibleClassChangeError_entry;
 131   static address _throw_NullPointerException_at_call_entry;
 132   static address _throw_StackOverflowError_entry;
 133   static address _handler_for_unsafe_access_entry;
 134 
 135   static address _atomic_xchg_entry;
 136   static address _atomic_xchg_ptr_entry;
 137   static address _atomic_store_entry;
 138   static address _atomic_store_ptr_entry;
 139   static address _atomic_cmpxchg_entry;


< prev index next >