< prev index next >

src/cpu/ppc/vm/sharedRuntime_ppc.cpp

Print this page
rev 12060 : 8166777: [ppc] port "8164086: Checked JNI pending exception check should be cleared"


2472   // DTrace method exit
2473 # endif
2474 
2475   // Clear "last Java frame" SP and PC.
2476   // --------------------------------------------------------------------------
2477 
2478   __ reset_last_Java_frame();
2479 
2480   // Unpack oop result.
2481   // --------------------------------------------------------------------------
2482 
2483   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2484     Label skip_unboxing;
2485     __ cmpdi(CCR0, R3_RET, 0);
2486     __ beq(CCR0, skip_unboxing);
2487     __ ld(R3_RET, 0, R3_RET);
2488     __ bind(skip_unboxing);
2489     __ verify_oop(R3_RET);
2490   }
2491 





2492 
2493   // Reset handle block.
2494   // --------------------------------------------------------------------------
2495   if (!is_critical_native) {
2496   __ ld(r_temp_1, thread_(active_handles));
2497   // TODO: PPC port assert(4 == JNIHandleBlock::top_size_in_bytes(), "unexpected field size");
2498   __ li(r_temp_2, 0);
2499   __ stw(r_temp_2, JNIHandleBlock::top_offset_in_bytes(), r_temp_1);
2500 
2501 
2502   // Check for pending exceptions.
2503   // --------------------------------------------------------------------------
2504   __ ld(r_temp_2, thread_(pending_exception));
2505   __ cmpdi(CCR0, r_temp_2, 0);
2506   __ bne(CCR0, handle_pending_exception);
2507   }
2508 
2509   // Return
2510   // --------------------------------------------------------------------------
2511 




2472   // DTrace method exit
2473 # endif
2474 
2475   // Clear "last Java frame" SP and PC.
2476   // --------------------------------------------------------------------------
2477 
2478   __ reset_last_Java_frame();
2479 
2480   // Unpack oop result.
2481   // --------------------------------------------------------------------------
2482 
2483   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
2484     Label skip_unboxing;
2485     __ cmpdi(CCR0, R3_RET, 0);
2486     __ beq(CCR0, skip_unboxing);
2487     __ ld(R3_RET, 0, R3_RET);
2488     __ bind(skip_unboxing);
2489     __ verify_oop(R3_RET);
2490   }
2491 
2492   if (CheckJNICalls) {
2493     // clear_pending_jni_exception_check
2494     __ load_const_optimized(R0, 0L);
2495     __ st_ptr(R0, JavaThread::pending_jni_exception_check_fn_offset(), R16_thread);
2496   }
2497 
2498   // Reset handle block.
2499   // --------------------------------------------------------------------------
2500   if (!is_critical_native) {
2501   __ ld(r_temp_1, thread_(active_handles));
2502   // TODO: PPC port assert(4 == JNIHandleBlock::top_size_in_bytes(), "unexpected field size");
2503   __ li(r_temp_2, 0);
2504   __ stw(r_temp_2, JNIHandleBlock::top_offset_in_bytes(), r_temp_1);
2505 
2506 
2507   // Check for pending exceptions.
2508   // --------------------------------------------------------------------------
2509   __ ld(r_temp_2, thread_(pending_exception));
2510   __ cmpdi(CCR0, r_temp_2, 0);
2511   __ bne(CCR0, handle_pending_exception);
2512   }
2513 
2514   // Return
2515   // --------------------------------------------------------------------------
2516 


< prev index next >