< prev index next >

src/cpu/sparc/vm/interp_masm_sparc.hpp

Print this page




  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 #ifndef CPU_SPARC_VM_INTERP_MASM_SPARC_HPP
  26 #define CPU_SPARC_VM_INTERP_MASM_SPARC_HPP
  27 
  28 #include "asm/macroAssembler.inline.hpp"
  29 #include "interpreter/invocationCounter.hpp"
  30 
  31 // This file specializes the assember with interpreter-specific macros
  32 


  33 REGISTER_DECLARATION(     Register, Otos_i , O0); // tos for ints, etc
  34 REGISTER_DECLARATION(     Register, Otos_l , O0); // for longs
  35 REGISTER_DECLARATION(     Register, Otos_l1, O0); // for 1st part of longs
  36 REGISTER_DECLARATION(     Register, Otos_l2, O1); // for 2nd part of longs
  37 REGISTER_DECLARATION(FloatRegister, Ftos_f , F0); // for floats
  38 REGISTER_DECLARATION(FloatRegister, Ftos_d , F0); // for doubles
  39 REGISTER_DECLARATION(FloatRegister, Ftos_d1, F0); // for 1st part of double
  40 REGISTER_DECLARATION(FloatRegister, Ftos_d2, F1); // for 2nd part of double
  41 
  42 #ifndef DONT_USE_REGISTER_DEFINES
  43 #define Otos_i  O0
  44 #define Otos_l  O0
  45 #define Otos_l1 O0
  46 #define Otos_l2 O1
  47 #define Ftos_f  F0
  48 #define Ftos_d  F0
  49 #define Ftos_d1 F0
  50 #define Ftos_d2 F1
  51 #endif // DONT_USE_REGISTER_DEFINES
  52 


 284   void test_invocation_counter_for_mdp(Register invocation_count, Register method_counters, Register Rtmp, Label &profile_continue);
 285 
 286   void set_mdp_data_at(int constant, Register value);
 287   void increment_mdp_data_at(Address counter, Register bumped_count,
 288                              bool decrement = false);
 289   void increment_mdp_data_at(int constant, Register bumped_count,
 290                              bool decrement = false);
 291   void increment_mdp_data_at(Register reg, int constant,
 292                              Register bumped_count, Register scratch2,
 293                              bool decrement = false);
 294   void increment_mask_and_jump(Address counter_addr,
 295                                int increment, Address mask_addr,
 296                                Register scratch1, Register scratch2,
 297                                Condition cond, Label *where);
 298   void set_mdp_flag_at(int flag_constant, Register scratch);
 299   void test_mdp_data_at(int offset, Register value, Label& not_equal_continue,
 300                         Register scratch);
 301 
 302   void record_klass_in_profile(Register receiver, Register scratch, bool is_virtual_call);
 303   void record_klass_in_profile_helper(Register receiver, Register scratch,
 304                                       int start_row, Label& done, bool is_virtual_call);




 305 
 306   void update_mdp_by_offset(int offset_of_disp, Register scratch);
 307   void update_mdp_by_offset(Register reg, int offset_of_disp,
 308                             Register scratch);
 309   void update_mdp_by_constant(int constant);
 310   void update_mdp_for_ret(TosState state, Register return_bci);
 311 
 312   void profile_taken_branch(Register scratch, Register bumped_count);
 313   void profile_not_taken_branch(Register scratch);
 314   void profile_call(Register scratch);
 315   void profile_final_call(Register scratch);
 316   void profile_virtual_call(Register receiver, Register scratch, bool receiver_can_be_null = false);

 317   void profile_ret(TosState state, Register return_bci, Register scratch);
 318   void profile_null_seen(Register scratch);
 319   void profile_typecheck(Register klass, Register scratch);
 320   void profile_typecheck_failed(Register scratch);
 321   void profile_switch_default(Register scratch);
 322   void profile_switch_case(Register index,
 323                            Register scratch1,
 324                            Register scratch2,
 325                            Register scratch3);
 326 
 327   void profile_obj_type(Register obj, const Address& mdo_addr, Register tmp);
 328   void profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual);
 329   void profile_return_type(Register ret, Register tmp1, Register tmp2);
 330   void profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
 331 
 332   // Debugging
 333   void interp_verify_oop(Register reg, TosState state, const char * file, int line);    // only if +VerifyOops && state == atos
 334   void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
 335   void verify_FPU(int stack_depth, TosState state = ftos); // only if +VerifyFPU  && (state == ftos || state == dtos)
 336 


  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 #ifndef CPU_SPARC_VM_INTERP_MASM_SPARC_HPP
  26 #define CPU_SPARC_VM_INTERP_MASM_SPARC_HPP
  27 
  28 #include "asm/macroAssembler.inline.hpp"
  29 #include "interpreter/invocationCounter.hpp"
  30 
  31 // This file specializes the assember with interpreter-specific macros
  32 
  33 typedef ByteSize (*OffsetFunction)(uint);
  34 
  35 REGISTER_DECLARATION(     Register, Otos_i , O0); // tos for ints, etc
  36 REGISTER_DECLARATION(     Register, Otos_l , O0); // for longs
  37 REGISTER_DECLARATION(     Register, Otos_l1, O0); // for 1st part of longs
  38 REGISTER_DECLARATION(     Register, Otos_l2, O1); // for 2nd part of longs
  39 REGISTER_DECLARATION(FloatRegister, Ftos_f , F0); // for floats
  40 REGISTER_DECLARATION(FloatRegister, Ftos_d , F0); // for doubles
  41 REGISTER_DECLARATION(FloatRegister, Ftos_d1, F0); // for 1st part of double
  42 REGISTER_DECLARATION(FloatRegister, Ftos_d2, F1); // for 2nd part of double
  43 
  44 #ifndef DONT_USE_REGISTER_DEFINES
  45 #define Otos_i  O0
  46 #define Otos_l  O0
  47 #define Otos_l1 O0
  48 #define Otos_l2 O1
  49 #define Ftos_f  F0
  50 #define Ftos_d  F0
  51 #define Ftos_d1 F0
  52 #define Ftos_d2 F1
  53 #endif // DONT_USE_REGISTER_DEFINES
  54 


 286   void test_invocation_counter_for_mdp(Register invocation_count, Register method_counters, Register Rtmp, Label &profile_continue);
 287 
 288   void set_mdp_data_at(int constant, Register value);
 289   void increment_mdp_data_at(Address counter, Register bumped_count,
 290                              bool decrement = false);
 291   void increment_mdp_data_at(int constant, Register bumped_count,
 292                              bool decrement = false);
 293   void increment_mdp_data_at(Register reg, int constant,
 294                              Register bumped_count, Register scratch2,
 295                              bool decrement = false);
 296   void increment_mask_and_jump(Address counter_addr,
 297                                int increment, Address mask_addr,
 298                                Register scratch1, Register scratch2,
 299                                Condition cond, Label *where);
 300   void set_mdp_flag_at(int flag_constant, Register scratch);
 301   void test_mdp_data_at(int offset, Register value, Label& not_equal_continue,
 302                         Register scratch);
 303 
 304   void record_klass_in_profile(Register receiver, Register scratch, bool is_virtual_call);
 305   void record_klass_in_profile_helper(Register receiver, Register scratch,
 306                                       Label& done, bool is_virtual_call);
 307   void record_item_in_profile_helper(Register item,
 308                                      Register scratch, int start_row, Label& done, int total_rows,
 309                                      OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn,
 310                                      int non_profiled_offset);
 311 
 312   void update_mdp_by_offset(int offset_of_disp, Register scratch);
 313   void update_mdp_by_offset(Register reg, int offset_of_disp,
 314                             Register scratch);
 315   void update_mdp_by_constant(int constant);
 316   void update_mdp_for_ret(TosState state, Register return_bci);
 317 
 318   void profile_taken_branch(Register scratch, Register bumped_count);
 319   void profile_not_taken_branch(Register scratch);
 320   void profile_call(Register scratch);
 321   void profile_final_call(Register scratch);
 322   void profile_virtual_call(Register receiver, Register scratch, bool receiver_can_be_null = false);
 323   void profile_called_method(Register method, Register scratch) NOT_JVMCI_RETURN;
 324   void profile_ret(TosState state, Register return_bci, Register scratch);
 325   void profile_null_seen(Register scratch);
 326   void profile_typecheck(Register klass, Register scratch);
 327   void profile_typecheck_failed(Register scratch);
 328   void profile_switch_default(Register scratch);
 329   void profile_switch_case(Register index,
 330                            Register scratch1,
 331                            Register scratch2,
 332                            Register scratch3);
 333 
 334   void profile_obj_type(Register obj, const Address& mdo_addr, Register tmp);
 335   void profile_arguments_type(Register callee, Register tmp1, Register tmp2, bool is_virtual);
 336   void profile_return_type(Register ret, Register tmp1, Register tmp2);
 337   void profile_parameters_type(Register tmp1, Register tmp2, Register tmp3, Register tmp4);
 338 
 339   // Debugging
 340   void interp_verify_oop(Register reg, TosState state, const char * file, int line);    // only if +VerifyOops && state == atos
 341   void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
 342   void verify_FPU(int stack_depth, TosState state = ftos); // only if +VerifyFPU  && (state == ftos || state == dtos)
 343 
< prev index next >