2670 }
2671
2672 // Clear "last Java frame" SP and PC.
2673 __ verify_thread(); // G2_thread must be correct
2674 __ reset_last_Java_frame();
2675
2676 // Unpack oop result
2677 if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2678 Label L;
2679 __ addcc(G0, I0, G0);
2680 __ brx(Assembler::notZero, true, Assembler::pt, L);
2681 __ delayed()->ld_ptr(I0, 0, I0);
2682 __ mov(G0, I0);
2683 __ bind(L);
2684 __ verify_oop(I0);
2685 }
2686
2687 if (!is_critical_native) {
2688 // reset handle block
2689 __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), L5);
2690 __ st_ptr(G0, L5, JNIHandleBlock::top_offset_in_bytes());
2691
2692 __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), G3_scratch);
2693 check_forward_pending_exception(masm, G3_scratch);
2694 }
2695
2696
2697 // Return
2698
2699 #ifndef _LP64
2700 if (ret_type == T_LONG) {
2701
2702 // Must leave proper result in O0,O1 and G1 (c2/tiered only)
2703 __ sllx(I0, 32, G1); // Shift bits into high G1
2704 __ srl (I1, 0, I1); // Zero extend O1 (harmless?)
2705 __ or3 (I1, G1, G1); // OR 64 bits into G1
2706 }
2707 #endif
2708
2709 __ ret();
2710 __ delayed()->restore();
|
2670 }
2671
2672 // Clear "last Java frame" SP and PC.
2673 __ verify_thread(); // G2_thread must be correct
2674 __ reset_last_Java_frame();
2675
2676 // Unpack oop result
2677 if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2678 Label L;
2679 __ addcc(G0, I0, G0);
2680 __ brx(Assembler::notZero, true, Assembler::pt, L);
2681 __ delayed()->ld_ptr(I0, 0, I0);
2682 __ mov(G0, I0);
2683 __ bind(L);
2684 __ verify_oop(I0);
2685 }
2686
2687 if (!is_critical_native) {
2688 // reset handle block
2689 __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), L5);
2690 __ st(G0, L5, JNIHandleBlock::top_offset_in_bytes());
2691
2692 __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), G3_scratch);
2693 check_forward_pending_exception(masm, G3_scratch);
2694 }
2695
2696
2697 // Return
2698
2699 #ifndef _LP64
2700 if (ret_type == T_LONG) {
2701
2702 // Must leave proper result in O0,O1 and G1 (c2/tiered only)
2703 __ sllx(I0, 32, G1); // Shift bits into high G1
2704 __ srl (I1, 0, I1); // Zero extend O1 (harmless?)
2705 __ or3 (I1, G1, G1); // OR 64 bits into G1
2706 }
2707 #endif
2708
2709 __ ret();
2710 __ delayed()->restore();
|