< prev index next >

src/hotspot/cpu/riscv/interp_masm_riscv.hpp

Print this page

 29 
 30 #include "asm/macroAssembler.hpp"
 31 #include "interpreter/invocationCounter.hpp"
 32 #include "runtime/frame.hpp"
 33 
 34 // This file specializes the assembler with interpreter-specific macros
 35 
 36 typedef ByteSize (*OffsetFunction)(uint);
 37 
 38 class InterpreterMacroAssembler: public MacroAssembler {
 39  protected:
 40   // Interpreter specific version of call_VM_base
 41   using MacroAssembler::call_VM_leaf_base;
 42 
 43   virtual void call_VM_leaf_base(address entry_point,
 44                                  int number_of_arguments);
 45 
 46   virtual void call_VM_base(Register oop_result,
 47                             Register java_thread,
 48                             Register last_java_sp,

 49                             address  entry_point,
 50                             int number_of_arguments,
 51                             bool check_exceptions);
 52 
 53   // base routine for all dispatches
 54   void dispatch_base(TosState state, address* table, bool verifyoop = true,
 55                      bool generate_poll = false, Register Rs = t0);
 56 
 57  public:
 58   InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
 59 
 60   void load_earlyret_value(TosState state);
 61 

 62   void call_VM_preemptable(Register oop_result,
 63                            address entry_point,
 64                            Register arg_1);








 65   void restore_after_resume(bool is_native);
 66 







 67   void jump_to_entry(address entry);
 68 
 69   virtual void check_and_handle_popframe(Register java_thread);
 70   virtual void check_and_handle_earlyret(Register java_thread);
 71 
 72   // Interpreter-specific registers
 73   void save_bcp() {
 74     sd(xbcp, Address(fp, frame::interpreter_frame_bcp_offset * wordSize));
 75   }
 76 
 77   void restore_bcp() {
 78     ld(xbcp, Address(fp, frame::interpreter_frame_bcp_offset * wordSize));
 79   }
 80 
 81   void restore_locals() {
 82     ld(xlocals, Address(fp, frame::interpreter_frame_locals_offset * wordSize));
 83     shadd(xlocals, xlocals, fp, t0, LogBytesPerWord);
 84   }
 85 
 86   void restore_constant_pool_cache() {

 29 
 30 #include "asm/macroAssembler.hpp"
 31 #include "interpreter/invocationCounter.hpp"
 32 #include "runtime/frame.hpp"
 33 
 34 // This file specializes the assembler with interpreter-specific macros
 35 
 36 typedef ByteSize (*OffsetFunction)(uint);
 37 
 38 class InterpreterMacroAssembler: public MacroAssembler {
 39  protected:
 40   // Interpreter specific version of call_VM_base
 41   using MacroAssembler::call_VM_leaf_base;
 42 
 43   virtual void call_VM_leaf_base(address entry_point,
 44                                  int number_of_arguments);
 45 
 46   virtual void call_VM_base(Register oop_result,
 47                             Register java_thread,
 48                             Register last_java_sp,
 49                             Label*   return_pc,
 50                             address  entry_point,
 51                             int number_of_arguments,
 52                             bool check_exceptions);
 53 
 54   // base routine for all dispatches
 55   void dispatch_base(TosState state, address* table, bool verifyoop = true,
 56                      bool generate_poll = false, Register Rs = t0);
 57 
 58  public:
 59   InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
 60 
 61   void load_earlyret_value(TosState state);
 62 
 63   // Use for vthread preemption
 64   void call_VM_preemptable(Register oop_result,
 65                            address entry_point,
 66                            Register arg_1,
 67                            bool check_exceptions = true);
 68 
 69   void call_VM_preemptable(Register oop_result,
 70                            address entry_point,
 71                            Register arg_1,
 72                            Register arg_2,
 73                            bool check_exceptions = true);
 74 
 75   void restore_after_resume(bool is_native);
 76 
 77  private:
 78   void call_VM_preemptable_helper(Register oop_result,
 79                                   address entry_point,
 80                                   int number_of_arguments,
 81                                   bool check_exceptions);
 82 
 83  public:
 84   void jump_to_entry(address entry);
 85 
 86   virtual void check_and_handle_popframe(Register java_thread);
 87   virtual void check_and_handle_earlyret(Register java_thread);
 88 
 89   // Interpreter-specific registers
 90   void save_bcp() {
 91     sd(xbcp, Address(fp, frame::interpreter_frame_bcp_offset * wordSize));
 92   }
 93 
 94   void restore_bcp() {
 95     ld(xbcp, Address(fp, frame::interpreter_frame_bcp_offset * wordSize));
 96   }
 97 
 98   void restore_locals() {
 99     ld(xlocals, Address(fp, frame::interpreter_frame_locals_offset * wordSize));
100     shadd(xlocals, xlocals, fp, t0, LogBytesPerWord);
101   }
102 
103   void restore_constant_pool_cache() {
< prev index next >