46 Register last_java_sp,
47 address entry_point,
48 int number_of_arguments,
49 bool check_exceptions);
50
51 // base routine for all dispatches
52 void dispatch_base(TosState state, address* table, bool verifyoop = true, bool generate_poll = false);
53
54 public:
55 InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code),
56 _locals_register(LP64_ONLY(r14) NOT_LP64(rdi)),
57 _bcp_register(LP64_ONLY(r13) NOT_LP64(rsi)) {}
58
59 void jump_to_entry(address entry);
60
61 virtual void check_and_handle_popframe(Register java_thread);
62 virtual void check_and_handle_earlyret(Register java_thread);
63
64 void load_earlyret_value(TosState state);
65
66 // Interpreter-specific registers
67 void save_bcp() {
68 movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), _bcp_register);
69 }
70
71 void restore_bcp() {
72 movptr(_bcp_register, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
73 }
74
75 void restore_locals() {
76 movptr(_locals_register, Address(rbp, frame::interpreter_frame_locals_offset * wordSize));
77 lea(_locals_register, Address(rbp, _locals_register, Address::times_ptr));
78 }
79
80 // Helpers for runtime call arguments/results
81 void get_method(Register reg) {
82 movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
83 }
84
85 void get_const(Register reg) {
|
46 Register last_java_sp,
47 address entry_point,
48 int number_of_arguments,
49 bool check_exceptions);
50
51 // base routine for all dispatches
52 void dispatch_base(TosState state, address* table, bool verifyoop = true, bool generate_poll = false);
53
54 public:
55 InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code),
56 _locals_register(LP64_ONLY(r14) NOT_LP64(rdi)),
57 _bcp_register(LP64_ONLY(r13) NOT_LP64(rsi)) {}
58
59 void jump_to_entry(address entry);
60
61 virtual void check_and_handle_popframe(Register java_thread);
62 virtual void check_and_handle_earlyret(Register java_thread);
63
64 void load_earlyret_value(TosState state);
65
66 void call_VM_preemptable(Register oop_result,
67 address entry_point,
68 Register arg_1);
69 void restore_after_resume(bool is_native);
70
71 // Interpreter-specific registers
72 void save_bcp() {
73 movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), _bcp_register);
74 }
75
76 void restore_bcp() {
77 movptr(_bcp_register, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
78 }
79
80 void restore_locals() {
81 movptr(_locals_register, Address(rbp, frame::interpreter_frame_locals_offset * wordSize));
82 lea(_locals_register, Address(rbp, _locals_register, Address::times_ptr));
83 }
84
85 // Helpers for runtime call arguments/results
86 void get_method(Register reg) {
87 movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
88 }
89
90 void get_const(Register reg) {
|