520 __ cmpptr(rsp, rax); |
520 __ cmpptr(rsp, rax); |
521 __ jcc(Assembler::above, after_frame_check_pop); |
521 __ jcc(Assembler::above, after_frame_check_pop); |
522 |
522 |
523 __ pop(rsi); // get saved bcp / (c++ prev state ). |
523 __ pop(rsi); // get saved bcp / (c++ prev state ). |
524 |
524 |
525 __ pop(rax); // get return address |
525 // Restore sender's sp as SP. This is necessary if the sender's |
526 __ jump(ExternalAddress(Interpreter::throw_StackOverflowError_entry())); |
526 // frame is an extended compiled frame (see gen_c2i_adapter()) |
527 |
527 // and safer anyway in case of JSR292 adaptations. |
|
528 |
|
529 __ pop(rax); // return address must be moved if SP is changed |
|
530 __ mov(rsp, rsi); |
|
531 __ push(rax); |
|
532 |
|
533 // Note: the restored frame is not necessarily interpreted. |
|
534 // Use the shared runtime version of the StackOverflowError. |
|
535 assert(StubRoutines::throw_StackOverflowError_entry() != NULL, "stub not yet generated"); |
|
536 __ jump(ExternalAddress(StubRoutines::throw_StackOverflowError_entry())); |
528 // all done with frame size check |
537 // all done with frame size check |
529 __ bind(after_frame_check_pop); |
538 __ bind(after_frame_check_pop); |
530 __ pop(rsi); |
539 __ pop(rsi); |
531 |
540 |
532 __ bind(after_frame_check); |
541 __ bind(after_frame_check); |