3476 // must do any gc of the args.
3477 //
3478 RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) {
3479 assert (StubRoutines::forward_exception_entry() != NULL, "must be generated before");
3480
3481 // allocate space for the code
3482 ResourceMark rm;
3483
3484 CodeBuffer buffer(name, 1000, 512);
3485 MacroAssembler* masm = new MacroAssembler(&buffer);
3486
3487 int frame_size_in_words;
3488
3489 OopMapSet *oop_maps = new OopMapSet();
3490 OopMap* map = NULL;
3491
3492 int start = __ offset();
3493
3494 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words);
3495
3496 int frame_complete = __ offset();
3497
3498 __ set_last_Java_frame(noreg, noreg, NULL);
3499
3500 __ mov(c_rarg0, r15_thread);
3501
3502 __ call(RuntimeAddress(destination));
3503
3504
3505 // Set an oopmap for the call site.
3506 // We need this not only for callee-saved registers, but also for volatile
3507 // registers that the compiler might be keeping live across a safepoint.
3508
3509 oop_maps->add_gc_map( __ offset() - start, map);
3510
3511 // rax contains the address we are going to jump to assuming no exception got installed
3512
3513 // clear last_Java_sp
3514 __ reset_last_Java_frame(false);
3515 // check for pending exceptions
|
3476 // must do any gc of the args.
3477 //
3478 RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) {
3479 assert (StubRoutines::forward_exception_entry() != NULL, "must be generated before");
3480
3481 // allocate space for the code
3482 ResourceMark rm;
3483
3484 CodeBuffer buffer(name, 1000, 512);
3485 MacroAssembler* masm = new MacroAssembler(&buffer);
3486
3487 int frame_size_in_words;
3488
3489 OopMapSet *oop_maps = new OopMapSet();
3490 OopMap* map = NULL;
3491
3492 int start = __ offset();
3493
3494 map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words);
3495
3496 // __ stop_if_in_cont(r10, "CONT 3");
3497
3498 int frame_complete = __ offset();
3499
3500 __ set_last_Java_frame(noreg, noreg, NULL);
3501
3502 __ mov(c_rarg0, r15_thread);
3503
3504 __ call(RuntimeAddress(destination));
3505
3506
3507 // Set an oopmap for the call site.
3508 // We need this not only for callee-saved registers, but also for volatile
3509 // registers that the compiler might be keeping live across a safepoint.
3510
3511 oop_maps->add_gc_map( __ offset() - start, map);
3512
3513 // rax contains the address we are going to jump to assuming no exception got installed
3514
3515 // clear last_Java_sp
3516 __ reset_last_Java_frame(false);
3517 // check for pending exceptions
|