302 const Register parameter_size = flags; 303 __ and3(flags, ConstantPoolCacheEntry::parameter_size_mask, parameter_size); // argument size in words 304 __ sll(parameter_size, Interpreter::logStackElementSize, parameter_size); // each argument size in bytes 305 __ add(Lesp, parameter_size, Lesp); // pop arguments 306 307 __ check_and_handle_popframe(Gtemp); 308 __ check_and_handle_earlyret(Gtemp); 309 310 __ dispatch_next(state, step); 311 312 return entry; 313 } 314 315 316 address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, int step) { 317 address entry = __ pc(); 318 __ get_constant_pool_cache(LcpoolCache); // load LcpoolCache 319 #if INCLUDE_JVMCI 320 // Check if we need to take lock at entry of synchronized method. This can 321 // only occur on method entry so emit it only for vtos with step 0. 322 if (UseJVMCICompiler && state == vtos && step == 0) { 323 Label L; 324 Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset()); 325 __ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter 326 __ cmp_and_br_short(Gtemp, G0, Assembler::equal, Assembler::pn, L); 327 // Clear flag. 328 __ stbool(G0, pending_monitor_enter_addr); 329 // Take lock. 330 lock_method(); 331 __ bind(L); 332 } else { 333 #ifdef ASSERT 334 if (UseJVMCICompiler) { 335 Label L; 336 Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset()); 337 __ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter 338 __ cmp_and_br_short(Gtemp, G0, Assembler::equal, Assembler::pn, L); 339 __ stop("unexpected pending monitor in deopt entry"); 340 __ bind(L); 341 } 342 #endif 343 } 344 #endif 345 { Label L; 346 Address exception_addr(G2_thread, Thread::pending_exception_offset()); 347 __ ld_ptr(exception_addr, Gtemp); // Load pending exception. 348 __ br_null_short(Gtemp, Assembler::pt, L); 349 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_pending_exception)); 350 __ should_not_reach_here(); 351 __ bind(L); 352 } 353 __ dispatch_next(state, step); 354 return entry; | 302 const Register parameter_size = flags; 303 __ and3(flags, ConstantPoolCacheEntry::parameter_size_mask, parameter_size); // argument size in words 304 __ sll(parameter_size, Interpreter::logStackElementSize, parameter_size); // each argument size in bytes 305 __ add(Lesp, parameter_size, Lesp); // pop arguments 306 307 __ check_and_handle_popframe(Gtemp); 308 __ check_and_handle_earlyret(Gtemp); 309 310 __ dispatch_next(state, step); 311 312 return entry; 313 } 314 315 316 address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, int step) { 317 address entry = __ pc(); 318 __ get_constant_pool_cache(LcpoolCache); // load LcpoolCache 319 #if INCLUDE_JVMCI 320 // Check if we need to take lock at entry of synchronized method. This can 321 // only occur on method entry so emit it only for vtos with step 0. 322 if (EnableJVMCI && state == vtos && step == 0) { 323 Label L; 324 Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset()); 325 __ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter 326 __ cmp_and_br_short(Gtemp, G0, Assembler::equal, Assembler::pn, L); 327 // Clear flag. 328 __ stbool(G0, pending_monitor_enter_addr); 329 // Take lock. 330 lock_method(); 331 __ bind(L); 332 } else { 333 #ifdef ASSERT 334 if (EnableJVMCI) { 335 Label L; 336 Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset()); 337 __ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter 338 __ cmp_and_br_short(Gtemp, G0, Assembler::equal, Assembler::pn, L); 339 __ stop("unexpected pending monitor in deopt entry"); 340 __ bind(L); 341 } 342 #endif 343 } 344 #endif 345 { Label L; 346 Address exception_addr(G2_thread, Thread::pending_exception_offset()); 347 __ ld_ptr(exception_addr, Gtemp); // Load pending exception. 348 __ br_null_short(Gtemp, Assembler::pt, L); 349 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_pending_exception)); 350 __ should_not_reach_here(); 351 __ bind(L); 352 } 353 __ dispatch_next(state, step); 354 return entry; |