src/cpu/sparc/vm/frame_sparc.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8074457 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/frame_sparc.inline.hpp

Print this page




  74 // return address:
  75 
  76 inline address  frame::sender_pc()        const    { return *I7_addr() + pc_return_offset; }
  77 
  78 inline address* frame::I7_addr() const  { return (address*) &sp()[ I7->sp_offset_in_saved_window()]; }
  79 inline address* frame::I0_addr() const  { return (address*) &sp()[ I0->sp_offset_in_saved_window()]; }
  80 
  81 inline address* frame::O7_addr() const  { return (address*) &younger_sp()[ I7->sp_offset_in_saved_window()]; }
  82 inline address* frame::O0_addr() const  { return (address*) &younger_sp()[ I0->sp_offset_in_saved_window()]; }
  83 
  84 inline intptr_t*    frame::sender_sp() const  { return fp(); }
  85 
  86 inline intptr_t* frame::real_fp() const { return fp(); }
  87 
  88 // Used only in frame::oopmapreg_to_location
  89 // This return a value in VMRegImpl::slot_size
  90 inline int frame::pd_oop_map_offset_adjustment() const {
  91   return _sp_adjustment_by_callee * VMRegImpl::slots_per_word;
  92 }
  93 
  94 #ifdef CC_INTERP
  95 inline intptr_t** frame::interpreter_frame_locals_addr() const {
  96   interpreterState istate = get_interpreterState();
  97   return (intptr_t**) &istate->_locals;
  98 }
  99 
 100 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
 101   interpreterState istate = get_interpreterState();
 102   return (intptr_t*) &istate->_bcp;
 103 }
 104 
 105 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
 106   interpreterState istate = get_interpreterState();
 107   return (intptr_t*) &istate->_mdx;
 108 }
 109 
 110 inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
 111 
 112 // bottom(base) of the expression stack (highest address)
 113 inline intptr_t* frame::interpreter_frame_expression_stack() const {
 114   return (intptr_t*)interpreter_frame_monitor_end() - 1;
 115 }
 116 
 117 // top of expression stack (lowest address)
 118 inline intptr_t* frame::interpreter_frame_tos_address() const {
 119   interpreterState istate = get_interpreterState();
 120   return istate->_stack + 1; // Is this off by one? QQQ
 121 }
 122 
 123 // monitor elements
 124 
 125 // in keeping with Intel side: end is lower in memory than begin;
 126 // and beginning element is oldest element
 127 // Also begin is one past last monitor.
 128 
 129 inline BasicObjectLock* frame::interpreter_frame_monitor_begin()       const  {
 130   return get_interpreterState()->monitor_base();
 131 }
 132 
 133 inline BasicObjectLock* frame::interpreter_frame_monitor_end()         const  {
 134   return (BasicObjectLock*) get_interpreterState()->stack_base();
 135 }
 136 
 137 
 138 inline int frame::interpreter_frame_monitor_size() {
 139   return round_to(BasicObjectLock::size(), WordsPerLong);
 140 }
 141 
 142 inline Method** frame::interpreter_frame_method_addr() const {
 143   interpreterState istate = get_interpreterState();
 144   return &istate->_method;
 145 }
 146 
 147 
 148 // Constant pool cache
 149 
 150 // where LcpoolCache is saved:
 151 inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
 152   interpreterState istate = get_interpreterState();
 153   return &istate->_constants; // should really use accessor
 154   }
 155 
 156 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
 157   interpreterState istate = get_interpreterState();
 158   return &istate->_constants;
 159 }
 160 
 161 #else // !CC_INTERP
 162 
 163 inline intptr_t** frame::interpreter_frame_locals_addr() const {
 164   return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
 165 }
 166 
 167 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
 168   return (intptr_t*) sp_addr_at( Lbcp->sp_offset_in_saved_window());
 169 }
 170 
 171 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
 172   // %%%%% reinterpreting ImethodDataPtr as a mdx
 173   return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
 174 }
 175 
 176 inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
 177 
 178 // bottom(base) of the expression stack (highest address)
 179 inline intptr_t* frame::interpreter_frame_expression_stack() const {
 180   return (intptr_t*)interpreter_frame_monitors() - 1;
 181 }
 182 


 229 }
 230 
 231 inline void frame::interpreter_frame_set_monitors(BasicObjectLock* monitors) {
 232   *interpreter_frame_monitors_addr() = monitors;
 233 }
 234 
 235 // Constant pool cache
 236 
 237 // where LcpoolCache is saved:
 238 inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
 239     return (ConstantPoolCache**)sp_addr_at(LcpoolCache->sp_offset_in_saved_window());
 240   }
 241 
 242 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
 243   return (ConstantPoolCache**)sp_addr_at( LcpoolCache->sp_offset_in_saved_window());
 244 }
 245 
 246 inline oop* frame::interpreter_frame_temp_oop_addr() const {
 247   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
 248 }
 249 #endif // CC_INTERP
 250 
 251 
 252 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
 253   // note: adjust this code if the link argument in StubGenerator::call_stub() changes!
 254   const Argument link = Argument(0, false);
 255   return (JavaCallWrapper**)&sp()[link.as_in().as_register()->sp_offset_in_saved_window()];
 256 }
 257 
 258 
 259 inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
 260    // always allocate non-argument locals 0..5 as if they were arguments:
 261   int allocated_above_frame = nof_args;
 262   if (allocated_above_frame < callee_register_argument_save_area_words)
 263     allocated_above_frame = callee_register_argument_save_area_words;
 264   if (allocated_above_frame > max_nof_locals)
 265     allocated_above_frame = max_nof_locals;
 266 
 267   // Note: monitors (BasicLock blocks) are never allocated in argument slots
 268   //assert(local_index >= 0 && local_index < max_nof_locals, "bad local index");
 269   if (local_index < allocated_above_frame)




  74 // return address:
  75 
  76 inline address  frame::sender_pc()        const    { return *I7_addr() + pc_return_offset; }
  77 
  78 inline address* frame::I7_addr() const  { return (address*) &sp()[ I7->sp_offset_in_saved_window()]; }
  79 inline address* frame::I0_addr() const  { return (address*) &sp()[ I0->sp_offset_in_saved_window()]; }
  80 
  81 inline address* frame::O7_addr() const  { return (address*) &younger_sp()[ I7->sp_offset_in_saved_window()]; }
  82 inline address* frame::O0_addr() const  { return (address*) &younger_sp()[ I0->sp_offset_in_saved_window()]; }
  83 
  84 inline intptr_t*    frame::sender_sp() const  { return fp(); }
  85 
  86 inline intptr_t* frame::real_fp() const { return fp(); }
  87 
  88 // Used only in frame::oopmapreg_to_location
  89 // This return a value in VMRegImpl::slot_size
  90 inline int frame::pd_oop_map_offset_adjustment() const {
  91   return _sp_adjustment_by_callee * VMRegImpl::slots_per_word;
  92 }
  93 





































































  94 inline intptr_t** frame::interpreter_frame_locals_addr() const {
  95   return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
  96 }
  97 
  98 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
  99   return (intptr_t*) sp_addr_at( Lbcp->sp_offset_in_saved_window());
 100 }
 101 
 102 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
 103   // %%%%% reinterpreting ImethodDataPtr as a mdx
 104   return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
 105 }
 106 
 107 inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
 108 
 109 // bottom(base) of the expression stack (highest address)
 110 inline intptr_t* frame::interpreter_frame_expression_stack() const {
 111   return (intptr_t*)interpreter_frame_monitors() - 1;
 112 }
 113 


 160 }
 161 
 162 inline void frame::interpreter_frame_set_monitors(BasicObjectLock* monitors) {
 163   *interpreter_frame_monitors_addr() = monitors;
 164 }
 165 
 166 // Constant pool cache
 167 
 168 // where LcpoolCache is saved:
 169 inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
 170     return (ConstantPoolCache**)sp_addr_at(LcpoolCache->sp_offset_in_saved_window());
 171   }
 172 
 173 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
 174   return (ConstantPoolCache**)sp_addr_at( LcpoolCache->sp_offset_in_saved_window());
 175 }
 176 
 177 inline oop* frame::interpreter_frame_temp_oop_addr() const {
 178   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
 179 }

 180 
 181 
 182 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
 183   // note: adjust this code if the link argument in StubGenerator::call_stub() changes!
 184   const Argument link = Argument(0, false);
 185   return (JavaCallWrapper**)&sp()[link.as_in().as_register()->sp_offset_in_saved_window()];
 186 }
 187 
 188 
 189 inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
 190    // always allocate non-argument locals 0..5 as if they were arguments:
 191   int allocated_above_frame = nof_args;
 192   if (allocated_above_frame < callee_register_argument_save_area_words)
 193     allocated_above_frame = callee_register_argument_save_area_words;
 194   if (allocated_above_frame > max_nof_locals)
 195     allocated_above_frame = max_nof_locals;
 196 
 197   // Note: monitors (BasicLock blocks) are never allocated in argument slots
 198   //assert(local_index >= 0 && local_index < max_nof_locals, "bad local index");
 199   if (local_index < allocated_above_frame)


src/cpu/sparc/vm/frame_sparc.inline.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File