< prev index next >

src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp

Print this page
rev 9429 : 8143072: Port JVMCI to AArch64
Summary: AArch64-specific code for JVMCI
Reviewed-by: duke


 208 #ifndef PRODUCT
 209   // tell the simulator that the method has been reentered
 210   if (NotifySimulator) {
 211     __ notify(Assembler::method_reentry);
 212   }
 213 #endif
 214   __ get_dispatch();
 215   __ dispatch_next(state, step);
 216 
 217   return entry;
 218 }
 219 
 220 address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
 221                                                                int step) {
 222   address entry = __ pc();
 223   __ restore_bcp();
 224   __ restore_locals();
 225   __ restore_constant_pool_cache();
 226   __ get_method(rmethod);
 227 













 228   // handle exceptions
 229   {
 230     Label L;
 231     __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
 232     __ cbz(rscratch1, L);
 233     __ call_VM(noreg,
 234                CAST_FROM_FN_PTR(address,
 235                                 InterpreterRuntime::throw_pending_exception));
 236     __ should_not_reach_here();
 237     __ bind(L);
 238   }
 239 
 240   __ get_dispatch();
 241 
 242   // Calculate stack limit
 243   __ ldr(rscratch1, Address(rmethod, Method::const_offset()));
 244   __ ldrh(rscratch1, Address(rscratch1, ConstMethod::max_stack_offset()));
 245   __ add(rscratch1, rscratch1, frame::interpreter_frame_monitor_size() + 2);
 246   __ ldr(rscratch2,
 247          Address(rfp, frame::interpreter_frame_initial_sp_offset * wordSize));




 208 #ifndef PRODUCT
 209   // tell the simulator that the method has been reentered
 210   if (NotifySimulator) {
 211     __ notify(Assembler::method_reentry);
 212   }
 213 #endif
 214   __ get_dispatch();
 215   __ dispatch_next(state, step);
 216 
 217   return entry;
 218 }
 219 
 220 address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
 221                                                                int step) {
 222   address entry = __ pc();
 223   __ restore_bcp();
 224   __ restore_locals();
 225   __ restore_constant_pool_cache();
 226   __ get_method(rmethod);
 227 
 228 #if INCLUDE_JVMCI
 229   // Check if we need to take lock at entry of synchronized method.
 230   if (UseJVMCICompiler) {
 231     Label L;
 232     __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
 233     __ cbz(rscratch1, L);
 234     // Clear flag.
 235     __ strb(zr, Address(rthread, JavaThread::pending_monitorenter_offset()));
 236     // Take lock.
 237     lock_method();
 238     __ bind(L);
 239   }
 240 #endif
 241   // handle exceptions
 242   {
 243     Label L;
 244     __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
 245     __ cbz(rscratch1, L);
 246     __ call_VM(noreg,
 247                CAST_FROM_FN_PTR(address,
 248                                 InterpreterRuntime::throw_pending_exception));
 249     __ should_not_reach_here();
 250     __ bind(L);
 251   }
 252 
 253   __ get_dispatch();
 254 
 255   // Calculate stack limit
 256   __ ldr(rscratch1, Address(rmethod, Method::const_offset()));
 257   __ ldrh(rscratch1, Address(rscratch1, ConstMethod::max_stack_offset()));
 258   __ add(rscratch1, rscratch1, frame::interpreter_frame_monitor_size() + 2);
 259   __ ldr(rscratch2,
 260          Address(rfp, frame::interpreter_frame_initial_sp_offset * wordSize));


< prev index next >