src/cpu/sparc/vm/sharedRuntime_sparc.cpp

Print this page




2442     __ call(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_locking_C), relocInfo::runtime_call_type);
2443     __ delayed()->mov(L7_thread_cache, O2);
2444 
2445     __ restore_thread(L7_thread_cache); // restore G2_thread
2446     __ reset_last_Java_frame();
2447 
2448 #ifdef ASSERT
2449     { Label L;
2450     __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O0);
2451     __ br_null_short(O0, Assembler::pt, L);
2452     __ stop("no pending exception allowed on exit from IR::monitorenter");
2453     __ bind(L);
2454     }
2455 #endif
2456     __ bind(done);
2457   }
2458 
2459 
2460   // Finally just about ready to make the JNI call
2461 
2462   __ flush_windows();
2463   if (inner_frame_created) {
2464     __ restore();
2465   } else {
2466     // Store only what we need from this frame
2467     // QQQ I think that non-v9 (like we care) we don't need these saves
2468     // either as the flush traps and the current window goes too.
2469     __ st_ptr(FP, SP, FP->sp_offset_in_saved_window()*wordSize + STACK_BIAS);
2470     __ st_ptr(I7, SP, I7->sp_offset_in_saved_window()*wordSize + STACK_BIAS);
2471   }
2472 
2473   // get JNIEnv* which is first argument to native
2474   if (!is_critical_native) {
2475     __ add(G2_thread, in_bytes(JavaThread::jni_environment_offset()), O0);
2476   }
2477 
2478   // Use that pc we placed in O7 a while back as the current frame anchor
2479   __ set_last_Java_frame(SP, O7);
2480 
2481   // We flushed the windows ages ago now mark them as flushed before transitioning.
2482   __ set(JavaFrameAnchor::flushed, G3_scratch);




2442     __ call(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_locking_C), relocInfo::runtime_call_type);
2443     __ delayed()->mov(L7_thread_cache, O2);
2444 
2445     __ restore_thread(L7_thread_cache); // restore G2_thread
2446     __ reset_last_Java_frame();
2447 
2448 #ifdef ASSERT
2449     { Label L;
2450     __ ld_ptr(G2_thread, in_bytes(Thread::pending_exception_offset()), O0);
2451     __ br_null_short(O0, Assembler::pt, L);
2452     __ stop("no pending exception allowed on exit from IR::monitorenter");
2453     __ bind(L);
2454     }
2455 #endif
2456     __ bind(done);
2457   }
2458 
2459 
2460   // Finally just about ready to make the JNI call
2461 
2462   __ flushw();
2463   if (inner_frame_created) {
2464     __ restore();
2465   } else {
2466     // Store only what we need from this frame
2467     // QQQ I think that non-v9 (like we care) we don't need these saves
2468     // either as the flush traps and the current window goes too.
2469     __ st_ptr(FP, SP, FP->sp_offset_in_saved_window()*wordSize + STACK_BIAS);
2470     __ st_ptr(I7, SP, I7->sp_offset_in_saved_window()*wordSize + STACK_BIAS);
2471   }
2472 
2473   // get JNIEnv* which is first argument to native
2474   if (!is_critical_native) {
2475     __ add(G2_thread, in_bytes(JavaThread::jni_environment_offset()), O0);
2476   }
2477 
2478   // Use that pc we placed in O7 a while back as the current frame anchor
2479   __ set_last_Java_frame(SP, O7);
2480 
2481   // We flushed the windows ages ago now mark them as flushed before transitioning.
2482   __ set(JavaFrameAnchor::flushed, G3_scratch);