< prev index next >

src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp

Print this page

127 
128   void get_constant_pool(Register reg) {
129     get_const(reg);
130     ldr(reg, Address(reg, in_bytes(ConstMethod::constants_offset())));
131   }
132 
133   void get_constant_pool_cache(Register reg) {
134     get_constant_pool(reg);
135     ldr(reg, Address(reg, ConstantPool::cache_offset()));
136   }
137 
138   void get_cpool_and_tags(Register cpool, Register tags) {
139     get_constant_pool(cpool);
140     ldr(tags, Address(cpool, ConstantPool::tags_offset()));
141   }
142 
143   void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset);
144   void get_cache_index_at_bcp(Register index, int bcp_offset, size_t index_size = sizeof(u2));
145   void get_method_counters(Register method, Register mcs, Label& skip);
146 






















147   // load cpool->resolved_references(index);
148   void load_resolved_reference_at_index(Register result, Register index, Register tmp = r5);
149 
150   // load cpool->resolved_klass_at(index);
151   void load_resolved_klass_at_offset(Register cpool, Register index, Register klass, Register temp);
152 
153   void pop_ptr(Register r = r0);
154   void pop_i(Register r = r0);
155   void pop_l(Register r = r0);
156   void pop_f(FloatRegister r = v0);
157   void pop_d(FloatRegister r = v0);
158   void push_ptr(Register r = r0);
159   void push_i(Register r = r0);
160   void push_l(Register r = r0);
161   void push_f(FloatRegister r = v0);
162   void push_d(FloatRegister r = v0);
163 
164   void pop(Register r ) { ((MacroAssembler*)this)->pop(r); }
165 
166   void push(Register r ) { ((MacroAssembler*)this)->push(r); }

171   void pop(RegSet regs, Register stack) { ((MacroAssembler*)this)->pop(regs, stack); }
172   void push(RegSet regs, Register stack) { ((MacroAssembler*)this)->push(regs, stack); }
173 
174   void empty_expression_stack() {
175     ldr(rscratch1, Address(rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize));
176     lea(esp, Address(rfp, rscratch1, Address::lsl(LogBytesPerWord)));
177     // null last_sp until next java call
178     str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
179   }
180 
181   // Helpers for swap and dup
182   void load_ptr(int n, Register val);
183   void store_ptr(int n, Register val);
184 
185   // Load float value from 'address'. The value is loaded onto the FPU register v0.
186   void load_float(Address src);
187   void load_double(Address src);
188 
189   // Generate a subtype check: branch to ok_is_subtype if sub_klass is
190   // a subtype of super_klass.
191   void gen_subtype_check( Register sub_klass, Label &ok_is_subtype );
192 
193   // Dispatching
194   void dispatch_prolog(TosState state, int step = 0);
195   void dispatch_epilog(TosState state, int step = 0);
196   // dispatch via rscratch1
197   void dispatch_only(TosState state, bool generate_poll = false);
198   // dispatch normal table via rscratch1 (assume rscratch1 is loaded already)
199   void dispatch_only_normal(TosState state);
200   void dispatch_only_noverify(TosState state);
201   // load rscratch1 from [rbcp + step] and dispatch via rscratch1
202   void dispatch_next(TosState state, int step = 0, bool generate_poll = false);
203   // load rscratch1 from [esi] and dispatch via rscratch1 and table
204   void dispatch_via (TosState state, address* table);
205 
206   // jump to an invoked target
207   void prepare_to_jump_from_interpreted();
208   void jump_from_interpreted(Register method, Register temp);
209 
210 
211   // Returning from interpreted functions

263                         Label& not_equal_continue);
264 
265   void record_klass_in_profile(Register receiver, Register mdp,
266                                Register reg2);
267   void record_klass_in_profile_helper(Register receiver, Register mdp,
268                                       Register reg2, int start_row,
269                                       Label& done);
270   void record_item_in_profile_helper(Register item, Register mdp,
271                                      Register reg2, int start_row, Label& done, int total_rows,
272                                      OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn);
273 
274   void update_mdp_by_offset(Register mdp_in, int offset_of_offset);
275   void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp);
276   void update_mdp_by_constant(Register mdp_in, int constant);
277   void update_mdp_for_ret(Register return_bci);
278 
279   // narrow int return value
280   void narrow(Register result);
281 
282   void profile_taken_branch(Register mdp, Register bumped_count);
283   void profile_not_taken_branch(Register mdp);
284   void profile_call(Register mdp);
285   void profile_final_call(Register mdp);
286   void profile_virtual_call(Register receiver, Register mdp,
287                             Register scratch2,
288                             bool receiver_can_be_null = false);
289   void profile_ret(Register return_bci, Register mdp);
290   void profile_null_seen(Register mdp);
291   void profile_typecheck(Register mdp, Register klass, Register scratch);
292   void profile_typecheck_failed(Register mdp);
293   void profile_switch_default(Register mdp);
294   void profile_switch_case(Register index_in_scratch, Register mdp,
295                            Register scratch2);




296 
297   void profile_obj_type(Register obj, const Address& mdo_addr);
298   void profile_arguments_type(Register mdp, Register callee, Register tmp, bool is_virtual);
299   void profile_return_type(Register mdp, Register ret, Register tmp);
300   void profile_parameters_type(Register mdp, Register tmp1, Register tmp2);
301 
302   // Debugging
303   // only if +VerifyOops && state == atos
304 #define interp_verify_oop(reg, state) _interp_verify_oop(reg, state, __FILE__, __LINE__);
305   void _interp_verify_oop(Register reg, TosState state, const char* file, int line);
306 
307   typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
308 
309   // support for jvmti/dtrace
310   void notify_method_entry();
311   void notify_method_exit(TosState state, NotifyMethodExitMode mode);
312 
313   virtual void _call_Unimplemented(address call_site) {
314     save_bcp();
315     set_last_Java_frame(esp, rfp, (address) pc(), rscratch1);

127 
128   void get_constant_pool(Register reg) {
129     get_const(reg);
130     ldr(reg, Address(reg, in_bytes(ConstMethod::constants_offset())));
131   }
132 
133   void get_constant_pool_cache(Register reg) {
134     get_constant_pool(reg);
135     ldr(reg, Address(reg, ConstantPool::cache_offset()));
136   }
137 
138   void get_cpool_and_tags(Register cpool, Register tags) {
139     get_constant_pool(cpool);
140     ldr(tags, Address(cpool, ConstantPool::tags_offset()));
141   }
142 
143   void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset);
144   void get_cache_index_at_bcp(Register index, int bcp_offset, size_t index_size = sizeof(u2));
145   void get_method_counters(Register method, Register mcs, Label& skip);
146 
147   // Kills t1 and t2, perserves klass, return allocation in new_obj
148   void allocate_instance(Register klass, Register new_obj,
149                          Register t1, Register t2,
150                          bool clear_fields, Label& alloc_failed);
151 
152   // Allocate instance in "obj" and read in the content of the inline field
153   // NOTES:
154   //   - input holder object via "obj", which must be r0,
155   //     will return new instance via the same reg
156   //   - assumes holder_klass and valueKlass field klass have both been resolved
157   void read_flat_field(Register entry,
158                        Register field_index, Register field_offset,
159                        Register temp, Register obj = r0);
160 
161   // Allocate value buffer in "obj" and read in flat element at the given index
162   // NOTES:
163   //   - Return via "obj" must be r0
164   //   - kills all given regs
165   void read_flat_element(Register array, Register index,
166                          Register t1, Register t2,
167                          Register obj = r0);
168 
169   // load cpool->resolved_references(index);
170   void load_resolved_reference_at_index(Register result, Register index, Register tmp = r5);
171 
172   // load cpool->resolved_klass_at(index);
173   void load_resolved_klass_at_offset(Register cpool, Register index, Register klass, Register temp);
174 
175   void pop_ptr(Register r = r0);
176   void pop_i(Register r = r0);
177   void pop_l(Register r = r0);
178   void pop_f(FloatRegister r = v0);
179   void pop_d(FloatRegister r = v0);
180   void push_ptr(Register r = r0);
181   void push_i(Register r = r0);
182   void push_l(Register r = r0);
183   void push_f(FloatRegister r = v0);
184   void push_d(FloatRegister r = v0);
185 
186   void pop(Register r ) { ((MacroAssembler*)this)->pop(r); }
187 
188   void push(Register r ) { ((MacroAssembler*)this)->push(r); }

193   void pop(RegSet regs, Register stack) { ((MacroAssembler*)this)->pop(regs, stack); }
194   void push(RegSet regs, Register stack) { ((MacroAssembler*)this)->push(regs, stack); }
195 
196   void empty_expression_stack() {
197     ldr(rscratch1, Address(rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize));
198     lea(esp, Address(rfp, rscratch1, Address::lsl(LogBytesPerWord)));
199     // null last_sp until next java call
200     str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
201   }
202 
203   // Helpers for swap and dup
204   void load_ptr(int n, Register val);
205   void store_ptr(int n, Register val);
206 
207   // Load float value from 'address'. The value is loaded onto the FPU register v0.
208   void load_float(Address src);
209   void load_double(Address src);
210 
211   // Generate a subtype check: branch to ok_is_subtype if sub_klass is
212   // a subtype of super_klass.
213   void gen_subtype_check( Register sub_klass, Label &ok_is_subtype, bool profile = true);
214 
215   // Dispatching
216   void dispatch_prolog(TosState state, int step = 0);
217   void dispatch_epilog(TosState state, int step = 0);
218   // dispatch via rscratch1
219   void dispatch_only(TosState state, bool generate_poll = false);
220   // dispatch normal table via rscratch1 (assume rscratch1 is loaded already)
221   void dispatch_only_normal(TosState state);
222   void dispatch_only_noverify(TosState state);
223   // load rscratch1 from [rbcp + step] and dispatch via rscratch1
224   void dispatch_next(TosState state, int step = 0, bool generate_poll = false);
225   // load rscratch1 from [esi] and dispatch via rscratch1 and table
226   void dispatch_via (TosState state, address* table);
227 
228   // jump to an invoked target
229   void prepare_to_jump_from_interpreted();
230   void jump_from_interpreted(Register method, Register temp);
231 
232 
233   // Returning from interpreted functions

285                         Label& not_equal_continue);
286 
287   void record_klass_in_profile(Register receiver, Register mdp,
288                                Register reg2);
289   void record_klass_in_profile_helper(Register receiver, Register mdp,
290                                       Register reg2, int start_row,
291                                       Label& done);
292   void record_item_in_profile_helper(Register item, Register mdp,
293                                      Register reg2, int start_row, Label& done, int total_rows,
294                                      OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn);
295 
296   void update_mdp_by_offset(Register mdp_in, int offset_of_offset);
297   void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp);
298   void update_mdp_by_constant(Register mdp_in, int constant);
299   void update_mdp_for_ret(Register return_bci);
300 
301   // narrow int return value
302   void narrow(Register result);
303 
304   void profile_taken_branch(Register mdp, Register bumped_count);
305   void profile_not_taken_branch(Register mdp, bool acmp = false);
306   void profile_call(Register mdp);
307   void profile_final_call(Register mdp);
308   void profile_virtual_call(Register receiver, Register mdp,
309                             Register scratch2,
310                             bool receiver_can_be_null = false);
311   void profile_ret(Register return_bci, Register mdp);
312   void profile_null_seen(Register mdp);
313   void profile_typecheck(Register mdp, Register klass, Register scratch);
314   void profile_typecheck_failed(Register mdp);
315   void profile_switch_default(Register mdp);
316   void profile_switch_case(Register index_in_scratch, Register mdp,
317                            Register scratch2);
318   template <class ArrayData> void profile_array_type(Register mdp, Register array, Register tmp);
319   void profile_multiple_element_types(Register mdp, Register element, Register tmp, Register tmp2);
320   void profile_element_type(Register mdp, Register element, Register tmp);
321   void profile_acmp(Register mdp, Register left, Register right, Register tmp);
322 
323   void profile_obj_type(Register obj, const Address& mdo_addr);
324   void profile_arguments_type(Register mdp, Register callee, Register tmp, bool is_virtual);
325   void profile_return_type(Register mdp, Register ret, Register tmp);
326   void profile_parameters_type(Register mdp, Register tmp1, Register tmp2);
327 
328   // Debugging
329   // only if +VerifyOops && state == atos
330 #define interp_verify_oop(reg, state) _interp_verify_oop(reg, state, __FILE__, __LINE__);
331   void _interp_verify_oop(Register reg, TosState state, const char* file, int line);
332 
333   typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
334 
335   // support for jvmti/dtrace
336   void notify_method_entry();
337   void notify_method_exit(TosState state, NotifyMethodExitMode mode);
338 
339   virtual void _call_Unimplemented(address call_site) {
340     save_bcp();
341     set_last_Java_frame(esp, rfp, (address) pc(), rscratch1);
< prev index next >