32 // This file specializes the assember with interpreter-specific macros.
33
34 class InterpreterMacroAssembler: public MacroAssembler {
35
36 protected:
37 // Interpreter specific version of call_VM_base().
38 virtual void call_VM_leaf_base(address entry_point);
39 virtual void call_VM_leaf_base(address entry_point, bool allow_relocation);
40
41 virtual void call_VM_base(Register oop_result,
42 Register last_java_sp,
43 address entry_point,
44 bool check_exceptions);
45 virtual void call_VM_base(Register oop_result,
46 Register last_java_sp,
47 address entry_point,
48 bool allow_relocation,
49 bool check_exceptions);
50
51 // Base routine for all dispatches.
52 void dispatch_base(TosState state, address* table);
53
54 public:
55 InterpreterMacroAssembler(CodeBuffer* c)
56 : MacroAssembler(c) {}
57
58 virtual void check_and_handle_popframe(Register java_thread);
59 virtual void check_and_handle_earlyret(Register java_thread);
60
61 void jump_to_entry(address entry, Register Rscratch);
62
63 virtual void load_earlyret_value(TosState state);
64
65 static const Address l_tmp;
66 static const Address d_tmp;
67
68 // Handy address generation macros.
69 #define thread_(field_name) Address(Z_thread, JavaThread::field_name ## _offset())
70 #define method_(field_name) Address(Z_method, Method::field_name ## _offset())
71 #define method2_(Rmethod, field_name) Address(Rmethod, Method::field_name ## _offset())
72
73 // Helper routine for frame allocation/deallocation.
74 // Compute the delta by which the caller's SP has to
75 // be adjusted to accomodate for the non-argument locals.
76 void compute_extra_locals_size_in_bytes(Register args_size, Register locals_size, Register delta);
77
78 // dispatch routines
79 void dispatch_prolog(TosState state, int step = 0);
80 void dispatch_epilog(TosState state, int step = 0);
81 void dispatch_only(TosState state);
82 // Dispatch normal table via Z_bytecode (assume Z_bytecode is loaded already).
83 void dispatch_only_normal(TosState state);
84 void dispatch_normal(TosState state);
85 void dispatch_next(TosState state, int step = 0);
86 void dispatch_next_noverify_oop(TosState state, int step = 0);
87 void dispatch_via(TosState state, address* table);
88
89 void narrow(Register result, Register ret_type);
90
91 // Jump to an invoked target.
92 void prepare_to_jump_from_interpreted(Register method);
93 void jump_from_interpreted(Register method, Register temp);
94
95 // Removes the current activation (incl. unlocking of monitors).
96 // Additionally this code is used for earlyReturn in which case we
97 // want to skip throwing an exception and installing an exception.
98 void remove_activation(TosState state,
99 Register return_pc,
100 bool throw_monitor_exception = true,
101 bool install_monitor_exception = true,
102 bool notify_jvmti = true);
103
104 public:
105 // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls.
|
32 // This file specializes the assember with interpreter-specific macros.
33
34 class InterpreterMacroAssembler: public MacroAssembler {
35
36 protected:
37 // Interpreter specific version of call_VM_base().
38 virtual void call_VM_leaf_base(address entry_point);
39 virtual void call_VM_leaf_base(address entry_point, bool allow_relocation);
40
41 virtual void call_VM_base(Register oop_result,
42 Register last_java_sp,
43 address entry_point,
44 bool check_exceptions);
45 virtual void call_VM_base(Register oop_result,
46 Register last_java_sp,
47 address entry_point,
48 bool allow_relocation,
49 bool check_exceptions);
50
51 // Base routine for all dispatches.
52 void dispatch_base(TosState state, address* table, bool generate_poll = false);
53
54 public:
55 InterpreterMacroAssembler(CodeBuffer* c)
56 : MacroAssembler(c) {}
57
58 virtual void check_and_handle_popframe(Register java_thread);
59 virtual void check_and_handle_earlyret(Register java_thread);
60
61 void jump_to_entry(address entry, Register Rscratch);
62
63 virtual void load_earlyret_value(TosState state);
64
65 static const Address l_tmp;
66 static const Address d_tmp;
67
68 // Handy address generation macros.
69 #define thread_(field_name) Address(Z_thread, JavaThread::field_name ## _offset())
70 #define method_(field_name) Address(Z_method, Method::field_name ## _offset())
71 #define method2_(Rmethod, field_name) Address(Rmethod, Method::field_name ## _offset())
72
73 // Helper routine for frame allocation/deallocation.
74 // Compute the delta by which the caller's SP has to
75 // be adjusted to accomodate for the non-argument locals.
76 void compute_extra_locals_size_in_bytes(Register args_size, Register locals_size, Register delta);
77
78 // dispatch routines
79 void dispatch_prolog(TosState state, int step = 0);
80 void dispatch_epilog(TosState state, int step = 0);
81 void dispatch_only(TosState state, bool generate_poll = false);
82 // Dispatch normal table via Z_bytecode (assume Z_bytecode is loaded already).
83 void dispatch_only_normal(TosState state);
84 void dispatch_normal(TosState state);
85 void dispatch_next(TosState state, int step = 0, bool generate_poll = false);
86 void dispatch_next_noverify_oop(TosState state, int step = 0);
87 void dispatch_via(TosState state, address* table);
88
89 void narrow(Register result, Register ret_type);
90
91 // Jump to an invoked target.
92 void prepare_to_jump_from_interpreted(Register method);
93 void jump_from_interpreted(Register method, Register temp);
94
95 // Removes the current activation (incl. unlocking of monitors).
96 // Additionally this code is used for earlyReturn in which case we
97 // want to skip throwing an exception and installing an exception.
98 void remove_activation(TosState state,
99 Register return_pc,
100 bool throw_monitor_exception = true,
101 bool install_monitor_exception = true,
102 bool notify_jvmti = true);
103
104 public:
105 // Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls.
|