src/cpu/x86/vm/templateInterpreter_x86_64.cpp

changeset 3372
dca455dea3a7
parent 3238
b20d64f83668
child 3400
22cee0ee8927
equal deleted inserted replaced
3371:8fdf463085e1 3372:dca455dea3a7
465 465
466 // check against the current stack bottom 466 // check against the current stack bottom
467 __ cmpptr(rsp, rax); 467 __ cmpptr(rsp, rax);
468 __ jcc(Assembler::above, after_frame_check); 468 __ jcc(Assembler::above, after_frame_check);
469 469
470 __ pop(rax); // get return address 470 // Restore sender's sp as SP. This is necessary if the sender's
471 __ jump(ExternalAddress(Interpreter::throw_StackOverflowError_entry())); 471 // frame is an extended compiled frame (see gen_c2i_adapter())
472 // and safer anyway in case of JSR292 adaptations.
473
474 __ pop(rax); // return address must be moved if SP is changed
475 __ mov(rsp, r13);
476 __ push(rax);
477
478 // Note: the restored frame is not necessarily interpreted.
479 // Use the shared runtime version of the StackOverflowError.
480 assert(StubRoutines::throw_StackOverflowError_entry() != NULL, "stub not yet generated");
481 __ jump(ExternalAddress(StubRoutines::throw_StackOverflowError_entry()));
472 482
473 // all done with frame size check 483 // all done with frame size check
474 __ bind(after_frame_check); 484 __ bind(after_frame_check);
475 } 485 }
476 486

mercurial