< prev index next >

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


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




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

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


 235   void set_mdp_data_at(Register mdp_in, int constant, Register value);
 236   void increment_mdp_data_at(Address data, bool decrement = false);
 237   void increment_mdp_data_at(Register mdp_in, int constant,
 238                              bool decrement = false);
 239   void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
 240                              bool decrement = false);
 241   void increment_mask_and_jump(Address counter_addr,
 242                                int increment, Address mask,
 243                                Register scratch, bool preloaded,
 244                                Condition cond, Label* where);
 245   void set_mdp_flag_at(Register mdp_in, int flag_constant);
 246   void test_mdp_data_at(Register mdp_in, int offset, Register value,
 247                         Register test_value_out,
 248                         Label& not_equal_continue);
 249 
 250   void record_klass_in_profile(Register receiver, Register mdp,
 251                                Register reg2, bool is_virtual_call);
 252   void record_klass_in_profile_helper(Register receiver, Register mdp,
 253                                       Register reg2, int start_row,
 254                                       Label& done, bool is_virtual_call);
 255   void record_item_in_profile_helper(Register item, Register mdp,
 256                                      Register reg2, int start_row, Label& done, int total_rows,
 257                                      OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn,
 258                                      int non_profiled_offset);
 259 
 260   void update_mdp_by_offset(Register mdp_in, int offset_of_offset);
 261   void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp);
 262   void update_mdp_by_constant(Register mdp_in, int constant);
 263   void update_mdp_for_ret(Register return_bci);
 264 
 265   void profile_taken_branch(Register mdp, Register bumped_count);
 266   void profile_not_taken_branch(Register mdp);
 267   void profile_call(Register mdp);
 268   void profile_final_call(Register mdp);
 269   void profile_virtual_call(Register receiver, Register mdp,
 270                             Register scratch2,
 271                             bool receiver_can_be_null = false);
 272   void profile_called_method(Register method, Register mdp, Register reg2) NOT_JVMCI_RETURN;
 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();
< prev index next >