368 InterpreterRuntime:: 369 create_klass_exception), 370 c_rarg1, c_rarg2); 371 } else { 372 // kind of lame ExternalAddress can't take NULL because 373 // external_word_Relocation will assert. 374 if (message != NULL) { 375 __ lea(c_rarg2, Address((address)message)); 376 } else { 377 __ mov(c_rarg2, NULL_WORD); 378 } 379 __ call_VM(r0, 380 CAST_FROM_FN_PTR(address, InterpreterRuntime::create_exception), 381 c_rarg1, c_rarg2); 382 } 383 // throw exception 384 __ b(address(Interpreter::throw_exception_entry())); 385 return entry; 386 } 387 388 address TemplateInterpreterGenerator::generate_continuation_for(TosState state) { 389 address entry = __ pc(); 390 // NULL last_sp until next java call 391 __ str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize)); 392 __ dispatch_next(state); 393 return entry; 394 } 395 396 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) { 397 address entry = __ pc(); 398 399 // Restore stack bottom in case i2c adjusted stack 400 __ ldr(esp, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize)); 401 // and NULL it as marker that esp is now tos until next java call 402 __ str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize)); 403 __ restore_bcp(); 404 __ restore_locals(); 405 __ restore_constant_pool_cache(); 406 __ get_method(rmethod); 407 408 // Pop N words from the stack 409 __ get_cache_and_index_at_bcp(r1, r2, 1, index_size); 410 __ ldr(r1, Address(r1, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset())); 411 __ andr(r1, r1, ConstantPoolCacheEntry::parameter_size_mask); 412 413 __ add(esp, esp, r1, Assembler::LSL, 3); 414 415 // Restore machine SP | 368 InterpreterRuntime:: 369 create_klass_exception), 370 c_rarg1, c_rarg2); 371 } else { 372 // kind of lame ExternalAddress can't take NULL because 373 // external_word_Relocation will assert. 374 if (message != NULL) { 375 __ lea(c_rarg2, Address((address)message)); 376 } else { 377 __ mov(c_rarg2, NULL_WORD); 378 } 379 __ call_VM(r0, 380 CAST_FROM_FN_PTR(address, InterpreterRuntime::create_exception), 381 c_rarg1, c_rarg2); 382 } 383 // throw exception 384 __ b(address(Interpreter::throw_exception_entry())); 385 return entry; 386 } 387 388 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) { 389 address entry = __ pc(); 390 391 // Restore stack bottom in case i2c adjusted stack 392 __ ldr(esp, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize)); 393 // and NULL it as marker that esp is now tos until next java call 394 __ str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize)); 395 __ restore_bcp(); 396 __ restore_locals(); 397 __ restore_constant_pool_cache(); 398 __ get_method(rmethod); 399 400 // Pop N words from the stack 401 __ get_cache_and_index_at_bcp(r1, r2, 1, index_size); 402 __ ldr(r1, Address(r1, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset())); 403 __ andr(r1, r1, ConstantPoolCacheEntry::parameter_size_mask); 404 405 __ add(esp, esp, r1, Assembler::LSL, 3); 406 407 // Restore machine SP |