2508 // rdi & rsi (also r15) are callee saved -> nothing to do 2509 #ifdef ASSERT 2510 guarantee(java_thread != rax, "change this code"); 2511 push(rax); 2512 { Label L; 2513 get_thread(rax); 2514 cmpptr(java_thread, rax); 2515 jcc(Assembler::equal, L); 2516 STOP("MacroAssembler::call_VM_base: rdi not callee saved?"); 2517 bind(L); 2518 } 2519 pop(rax); 2520 #endif 2521 } else { 2522 get_thread(java_thread); 2523 } 2524 // reset last Java frame 2525 // Only interpreter should have to clear fp 2526 reset_last_Java_frame(java_thread, true, false); 2527 2528 #ifndef CC_INTERP 2529 // C++ interp handles this in the interpreter 2530 check_and_handle_popframe(java_thread); 2531 check_and_handle_earlyret(java_thread); 2532 #endif /* CC_INTERP */ 2533 2534 if (check_exceptions) { 2535 // check for pending exceptions (java_thread is set upon return) 2536 cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t) NULL_WORD); 2537 #ifndef _LP64 2538 jump_cc(Assembler::notEqual, 2539 RuntimeAddress(StubRoutines::forward_exception_entry())); 2540 #else 2541 // This used to conditionally jump to forward_exception however it is 2542 // possible if we relocate that the branch will not reach. So we must jump 2543 // around so we can always reach 2544 2545 Label ok; 2546 jcc(Assembler::equal, ok); 2547 jump(RuntimeAddress(StubRoutines::forward_exception_entry())); 2548 bind(ok); 2549 #endif // LP64 2550 } 2551 2552 // get oop result if there is one and reset the value in the thread | 2508 // rdi & rsi (also r15) are callee saved -> nothing to do 2509 #ifdef ASSERT 2510 guarantee(java_thread != rax, "change this code"); 2511 push(rax); 2512 { Label L; 2513 get_thread(rax); 2514 cmpptr(java_thread, rax); 2515 jcc(Assembler::equal, L); 2516 STOP("MacroAssembler::call_VM_base: rdi not callee saved?"); 2517 bind(L); 2518 } 2519 pop(rax); 2520 #endif 2521 } else { 2522 get_thread(java_thread); 2523 } 2524 // reset last Java frame 2525 // Only interpreter should have to clear fp 2526 reset_last_Java_frame(java_thread, true, false); 2527 2528 // C++ interp handles this in the interpreter 2529 check_and_handle_popframe(java_thread); 2530 check_and_handle_earlyret(java_thread); 2531 2532 if (check_exceptions) { 2533 // check for pending exceptions (java_thread is set upon return) 2534 cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t) NULL_WORD); 2535 #ifndef _LP64 2536 jump_cc(Assembler::notEqual, 2537 RuntimeAddress(StubRoutines::forward_exception_entry())); 2538 #else 2539 // This used to conditionally jump to forward_exception however it is 2540 // possible if we relocate that the branch will not reach. So we must jump 2541 // around so we can always reach 2542 2543 Label ok; 2544 jcc(Assembler::equal, ok); 2545 jump(RuntimeAddress(StubRoutines::forward_exception_entry())); 2546 bind(ok); 2547 #endif // LP64 2548 } 2549 2550 // get oop result if there is one and reset the value in the thread |