370 __ call(RuntimeAddress(target)); 371 assert(_patch_info_offset == (patch_info_pc - __ pc()), "must not change"); 372 ce->add_call_info_here(_info); 373 int jmp_off = __ offset(); 374 __ jmp(_patch_site_entry); 375 // Add enough nops so deoptimization can overwrite the jmp above with a call 376 // and not destroy the world. 377 for (int j = __ offset() ; j < jmp_off + 5 ; j++ ) { 378 __ nop(); 379 } 380 if (_id == load_klass_id) { 381 CodeSection* cs = __ code_section(); 382 RelocIterator iter(cs, (address)_pc_start, (address)(_pc_start + 1)); 383 relocInfo::change_reloc_info_for_address(&iter, (address) _pc_start, relocInfo::oop_type, relocInfo::none); 384 } 385 } 386 387 388 void DeoptimizeStub::emit_code(LIR_Assembler* ce) { 389 __ bind(_entry); 390 __ call(RuntimeAddress(SharedRuntime::deopt_blob()->unpack_with_reexecution())); 391 ce->add_call_info_here(_info); 392 debug_only(__ should_not_reach_here()); 393 } 394 395 396 void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) { 397 ce->compilation()->implicit_exception_table()->append(_offset, __ offset()); 398 __ bind(_entry); 399 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_null_pointer_exception_id))); 400 ce->add_call_info_here(_info); 401 debug_only(__ should_not_reach_here()); 402 } 403 404 405 void SimpleExceptionStub::emit_code(LIR_Assembler* ce) { 406 assert(__ rsp_offset() == 0, "frame size should be fixed"); 407 408 __ bind(_entry); 409 // pass the object on stack because all registers must be preserved 410 if (_obj->is_cpu_register()) { 411 ce->store_parameter(_obj->as_register(), 0); 412 } | 370 __ call(RuntimeAddress(target)); 371 assert(_patch_info_offset == (patch_info_pc - __ pc()), "must not change"); 372 ce->add_call_info_here(_info); 373 int jmp_off = __ offset(); 374 __ jmp(_patch_site_entry); 375 // Add enough nops so deoptimization can overwrite the jmp above with a call 376 // and not destroy the world. 377 for (int j = __ offset() ; j < jmp_off + 5 ; j++ ) { 378 __ nop(); 379 } 380 if (_id == load_klass_id) { 381 CodeSection* cs = __ code_section(); 382 RelocIterator iter(cs, (address)_pc_start, (address)(_pc_start + 1)); 383 relocInfo::change_reloc_info_for_address(&iter, (address) _pc_start, relocInfo::oop_type, relocInfo::none); 384 } 385 } 386 387 388 void DeoptimizeStub::emit_code(LIR_Assembler* ce) { 389 __ bind(_entry); 390 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::deoptimize_id))); 391 ce->add_call_info_here(_info); 392 DEBUG_ONLY(__ should_not_reach_here()); 393 } 394 395 396 void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) { 397 ce->compilation()->implicit_exception_table()->append(_offset, __ offset()); 398 __ bind(_entry); 399 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_null_pointer_exception_id))); 400 ce->add_call_info_here(_info); 401 debug_only(__ should_not_reach_here()); 402 } 403 404 405 void SimpleExceptionStub::emit_code(LIR_Assembler* ce) { 406 assert(__ rsp_offset() == 0, "frame size should be fixed"); 407 408 __ bind(_entry); 409 // pass the object on stack because all registers must be preserved 410 if (_obj->is_cpu_register()) { 411 ce->store_parameter(_obj->as_register(), 0); 412 } |