src/hotspot/cpu/s390/sharedRuntime_s390.cpp
changeset 52460 f1bb77833b59
parent 51996 84743156e780
child 54847 59ea39bb2809
equal deleted inserted replaced
52459:cbe83e9c2100 52460:f1bb77833b59
  2159   {
  2159   {
  2160     Label no_block, sync;
  2160     Label no_block, sync;
  2161 
  2161 
  2162     save_native_result(masm, ret_type, workspace_slot_offset); // Make Z_R2 available as work reg.
  2162     save_native_result(masm, ret_type, workspace_slot_offset); // Make Z_R2 available as work reg.
  2163 
  2163 
  2164     if (UseMembar) {
  2164     // Force this write out before the read below.
  2165       // Force this write out before the read below.
  2165     __ z_fence();
  2166       __ z_fence();
       
  2167     } else {
       
  2168       // Write serialization page so VM thread can do a pseudo remote membar.
       
  2169       // We use the current thread pointer to calculate a thread specific
       
  2170       // offset to write to within the page. This minimizes bus traffic
       
  2171       // due to cache line collision.
       
  2172       __ serialize_memory(Z_thread, Z_R1, Z_R2);
       
  2173     }
       
  2174 
  2166 
  2175     __ safepoint_poll(sync, Z_R1);
  2167     __ safepoint_poll(sync, Z_R1);
  2176 
  2168 
  2177     __ load_and_test_int(Z_R0, Address(Z_thread, JavaThread::suspend_flags_offset()));
  2169     __ load_and_test_int(Z_R0, Address(Z_thread, JavaThread::suspend_flags_offset()));
  2178     __ z_bre(no_block);
  2170     __ z_bre(no_block);