< prev index next >

hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp

Print this page




2748        CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
2749        G2_thread, O1);
2750     restore_native_result(masm, ret_type, stack_slots);
2751   }
2752 
2753   // Clear "last Java frame" SP and PC.
2754   __ verify_thread(); // G2_thread must be correct
2755   __ reset_last_Java_frame();
2756 
2757   // Unpack oop result
2758   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2759       Label L;
2760       __ addcc(G0, I0, G0);
2761       __ brx(Assembler::notZero, true, Assembler::pt, L);
2762       __ delayed()->ld_ptr(I0, 0, I0);
2763       __ mov(G0, I0);
2764       __ bind(L);
2765       __ verify_oop(I0);
2766   }
2767 





2768   if (!is_critical_native) {
2769     // reset handle block
2770     __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), L5);
2771     __ st(G0, L5, JNIHandleBlock::top_offset_in_bytes());
2772 
2773     __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), G3_scratch);
2774     check_forward_pending_exception(masm, G3_scratch);
2775   }
2776 
2777 
2778   // Return
2779 
2780 #ifndef _LP64
2781   if (ret_type == T_LONG) {
2782 
2783     // Must leave proper result in O0,O1 and G1 (c2/tiered only)
2784     __ sllx(I0, 32, G1);          // Shift bits into high G1
2785     __ srl (I1, 0, I1);           // Zero extend O1 (harmless?)
2786     __ or3 (I1, G1, G1);          // OR 64 bits into G1
2787   }




2748        CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
2749        G2_thread, O1);
2750     restore_native_result(masm, ret_type, stack_slots);
2751   }
2752 
2753   // Clear "last Java frame" SP and PC.
2754   __ verify_thread(); // G2_thread must be correct
2755   __ reset_last_Java_frame();
2756 
2757   // Unpack oop result
2758   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2759       Label L;
2760       __ addcc(G0, I0, G0);
2761       __ brx(Assembler::notZero, true, Assembler::pt, L);
2762       __ delayed()->ld_ptr(I0, 0, I0);
2763       __ mov(G0, I0);
2764       __ bind(L);
2765       __ verify_oop(I0);
2766   }
2767 
2768   if (CheckJNICalls) {
2769     // clear_pending_jni_exception_check
2770     __ st_ptr(G0, G2_thread, JavaThread::pending_jni_exception_check_fn_offset());
2771   }
2772 
2773   if (!is_critical_native) {
2774     // reset handle block
2775     __ ld_ptr(G2_thread, in_bytes(JavaThread::active_handles_offset()), L5);
2776     __ st(G0, L5, JNIHandleBlock::top_offset_in_bytes());
2777 
2778     __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), G3_scratch);
2779     check_forward_pending_exception(masm, G3_scratch);
2780   }
2781 
2782 
2783   // Return
2784 
2785 #ifndef _LP64
2786   if (ret_type == T_LONG) {
2787 
2788     // Must leave proper result in O0,O1 and G1 (c2/tiered only)
2789     __ sllx(I0, 32, G1);          // Shift bits into high G1
2790     __ srl (I1, 0, I1);           // Zero extend O1 (harmless?)
2791     __ or3 (I1, G1, G1);          // OR 64 bits into G1
2792   }


< prev index next >