src/cpu/x86/vm/interp_masm_x86.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/cpu/x86/vm

src/cpu/x86/vm/interp_masm_x86.hpp

Print this page




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

  35 
  36 class InterpreterMacroAssembler: public MacroAssembler {
  37 
  38 #ifndef CC_INTERP
  39  protected:
  40   // Interpreter specific version of call_VM_base
  41   virtual void call_VM_leaf_base(address entry_point,
  42                                  int number_of_arguments);
  43 
  44   virtual void call_VM_base(Register oop_result,
  45                             Register java_thread,
  46                             Register last_java_sp,
  47                             address  entry_point,
  48                             int number_of_arguments,
  49                             bool check_exceptions);
  50 
  51   virtual void check_and_handle_popframe(Register java_thread);
  52   virtual void check_and_handle_earlyret(Register java_thread);
  53 
  54   // base routine for all dispatches


 232   void set_mdp_data_at(Register mdp_in, int constant, Register value);
 233   void increment_mdp_data_at(Address data, bool decrement = false);
 234   void increment_mdp_data_at(Register mdp_in, int constant,
 235                              bool decrement = false);
 236   void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
 237                              bool decrement = false);
 238   void increment_mask_and_jump(Address counter_addr,
 239                                int increment, Address mask,
 240                                Register scratch, bool preloaded,
 241                                Condition cond, Label* where);
 242   void set_mdp_flag_at(Register mdp_in, int flag_constant);
 243   void test_mdp_data_at(Register mdp_in, int offset, Register value,
 244                         Register test_value_out,
 245                         Label& not_equal_continue);
 246 
 247   void record_klass_in_profile(Register receiver, Register mdp,
 248                                Register reg2, bool is_virtual_call);
 249   void record_klass_in_profile_helper(Register receiver, Register mdp,
 250                                       Register reg2, int start_row,
 251                                       Label& done, bool is_virtual_call);




 252 
 253   void update_mdp_by_offset(Register mdp_in, int offset_of_offset);
 254   void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp);
 255   void update_mdp_by_constant(Register mdp_in, int constant);
 256   void update_mdp_for_ret(Register return_bci);
 257 
 258   void profile_taken_branch(Register mdp, Register bumped_count);
 259   void profile_not_taken_branch(Register mdp);
 260   void profile_call(Register mdp);
 261   void profile_final_call(Register mdp);
 262   void profile_virtual_call(Register receiver, Register mdp,
 263                             Register scratch2,
 264                             bool receiver_can_be_null = false);



 265   void profile_ret(Register return_bci, Register mdp);
 266   void profile_null_seen(Register mdp);
 267   void profile_typecheck(Register mdp, Register klass, Register scratch);
 268   void profile_typecheck_failed(Register mdp);
 269   void profile_switch_default(Register mdp);
 270   void profile_switch_case(Register index_in_scratch, Register mdp,
 271                            Register scratch2);
 272 
 273   // Debugging
 274   // only if +VerifyOops && state == atos
 275   void verify_oop(Register reg, TosState state = atos);
 276   // only if +VerifyFPU  && (state == ftos || state == dtos)
 277   void verify_FPU(int stack_depth, TosState state = ftos);
 278 
 279 #endif // !CC_INTERP
 280 
 281   typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
 282 
 283   // support for jvmti/dtrace
 284   void notify_method_entry();


  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_X86_VM_INTERP_MASM_X86_HPP
  26 #define CPU_X86_VM_INTERP_MASM_X86_HPP
  27 
  28 #include "asm/macroAssembler.hpp"
  29 #include "asm/macroAssembler.inline.hpp"
  30 #include "interpreter/invocationCounter.hpp"
  31 #include "runtime/frame.hpp"
  32 
  33 // This file specializes the assember with interpreter-specific macros
  34 
  35 typedef ByteSize (*OffsetFunction)(uint);
  36 
  37 class InterpreterMacroAssembler: public MacroAssembler {
  38 
  39 #ifndef CC_INTERP
  40  protected:
  41   // Interpreter specific version of call_VM_base
  42   virtual void call_VM_leaf_base(address entry_point,
  43                                  int number_of_arguments);
  44 
  45   virtual void call_VM_base(Register oop_result,
  46                             Register java_thread,
  47                             Register last_java_sp,
  48                             address  entry_point,
  49                             int number_of_arguments,
  50                             bool check_exceptions);
  51 
  52   virtual void check_and_handle_popframe(Register java_thread);
  53   virtual void check_and_handle_earlyret(Register java_thread);
  54 
  55   // base routine for all dispatches


 233   void set_mdp_data_at(Register mdp_in, int constant, Register value);
 234   void increment_mdp_data_at(Address data, bool decrement = false);
 235   void increment_mdp_data_at(Register mdp_in, int constant,
 236                              bool decrement = false);
 237   void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
 238                              bool decrement = false);
 239   void increment_mask_and_jump(Address counter_addr,
 240                                int increment, Address mask,
 241                                Register scratch, bool preloaded,
 242                                Condition cond, Label* where);
 243   void set_mdp_flag_at(Register mdp_in, int flag_constant);
 244   void test_mdp_data_at(Register mdp_in, int offset, Register value,
 245                         Register test_value_out,
 246                         Label& not_equal_continue);
 247 
 248   void record_klass_in_profile(Register receiver, Register mdp,
 249                                Register reg2, bool is_virtual_call);
 250   void record_klass_in_profile_helper(Register receiver, Register mdp,
 251                                       Register reg2, int start_row,
 252                                       Label& done, bool is_virtual_call);
 253   void record_item_in_profile_helper(Register item, Register mdp,
 254                                      Register reg2, int start_row, Label& done, int total_rows,
 255                                      OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn,
 256                                      int non_profiled_offset);
 257 
 258   void update_mdp_by_offset(Register mdp_in, int offset_of_offset);
 259   void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp);
 260   void update_mdp_by_constant(Register mdp_in, int constant);
 261   void update_mdp_for_ret(Register return_bci);
 262 
 263   void profile_taken_branch(Register mdp, Register bumped_count);
 264   void profile_not_taken_branch(Register mdp);
 265   void profile_call(Register mdp);
 266   void profile_final_call(Register mdp);
 267   void profile_virtual_call(Register receiver, Register mdp,
 268                             Register scratch2,
 269                             bool receiver_can_be_null = false);
 270 #if INCLUDE_JVMCI
 271   void profile_called_method(Register method, Register mdp, Register reg2);
 272 #endif
 273   void profile_ret(Register return_bci, Register mdp);
 274   void profile_null_seen(Register mdp);
 275   void profile_typecheck(Register mdp, Register klass, Register scratch);
 276   void profile_typecheck_failed(Register mdp);
 277   void profile_switch_default(Register mdp);
 278   void profile_switch_case(Register index_in_scratch, Register mdp,
 279                            Register scratch2);
 280 
 281   // Debugging
 282   // only if +VerifyOops && state == atos
 283   void verify_oop(Register reg, TosState state = atos);
 284   // only if +VerifyFPU  && (state == ftos || state == dtos)
 285   void verify_FPU(int stack_depth, TosState state = ftos);
 286 
 287 #endif // !CC_INTERP
 288 
 289   typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
 290 
 291   // support for jvmti/dtrace
 292   void notify_method_entry();
src/cpu/x86/vm/interp_masm_x86.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File