< prev index next >

hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp

Print this page




2572     save_native_result(masm, ret_type, stack_slots);
2573     __ mov_metadata(c_rarg1, method());
2574     __ call_VM_leaf(
2575          CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
2576          r15_thread, c_rarg1);
2577     restore_native_result(masm, ret_type, stack_slots);
2578   }
2579 
2580   __ reset_last_Java_frame(false, true);
2581 
2582   // Unpack oop result
2583   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2584       Label L;
2585       __ testptr(rax, rax);
2586       __ jcc(Assembler::zero, L);
2587       __ movptr(rax, Address(rax, 0));
2588       __ bind(L);
2589       __ verify_oop(rax);
2590   }
2591 





2592   if (!is_critical_native) {
2593     // reset handle block
2594     __ movptr(rcx, Address(r15_thread, JavaThread::active_handles_offset()));
2595     __ movl(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD);
2596   }
2597 
2598   // pop our frame
2599 
2600   __ leave();
2601 
2602   if (!is_critical_native) {
2603     // Any exception pending?
2604     __ cmpptr(Address(r15_thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
2605     __ jcc(Assembler::notEqual, exception_pending);
2606   }
2607 
2608   // Return
2609 
2610   __ ret(0);
2611 




2572     save_native_result(masm, ret_type, stack_slots);
2573     __ mov_metadata(c_rarg1, method());
2574     __ call_VM_leaf(
2575          CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
2576          r15_thread, c_rarg1);
2577     restore_native_result(masm, ret_type, stack_slots);
2578   }
2579 
2580   __ reset_last_Java_frame(false, true);
2581 
2582   // Unpack oop result
2583   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2584       Label L;
2585       __ testptr(rax, rax);
2586       __ jcc(Assembler::zero, L);
2587       __ movptr(rax, Address(rax, 0));
2588       __ bind(L);
2589       __ verify_oop(rax);
2590   }
2591 
2592   if (CheckJNICalls) {
2593     // clear_pending_jni_exception_check
2594     __ movptr(Address(r15_thread, JavaThread::pending_jni_exception_check_fn_offset()), NULL_WORD);
2595   }
2596 
2597   if (!is_critical_native) {
2598     // reset handle block
2599     __ movptr(rcx, Address(r15_thread, JavaThread::active_handles_offset()));
2600     __ movl(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD);
2601   }
2602 
2603   // pop our frame
2604 
2605   __ leave();
2606 
2607   if (!is_critical_native) {
2608     // Any exception pending?
2609     __ cmpptr(Address(r15_thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
2610     __ jcc(Assembler::notEqual, exception_pending);
2611   }
2612 
2613   // Return
2614 
2615   __ ret(0);
2616 


< prev index next >