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 (os::is_MP()) { |
2164 if (UseMembar) { |
2165 if (UseMembar) { |
2165 // Force this write out before the read below. |
2166 // Force this write out before the read below. |
2166 __ z_fence(); |
2167 __ z_fence(); |
2167 } else { |
2168 } else { |
2168 // Write serialization page so VM thread can do a pseudo remote membar. |
2169 // 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 // We use the current thread pointer to calculate a thread specific |
2170 // offset to write to within the page. This minimizes bus traffic |
2171 // offset to write to within the page. This minimizes bus traffic |
2171 // due to cache line collision. |
2172 // due to cache line collision. |
2172 __ serialize_memory(Z_thread, Z_R1, Z_R2); |
2173 __ serialize_memory(Z_thread, Z_R1, Z_R2); |
2173 } |
2174 } |
2174 |
2175 } |
|
2176 __ safepoint_poll(sync, Z_R1); |
2175 __ safepoint_poll(sync, Z_R1); |
2177 |
2176 |
2178 __ load_and_test_int(Z_R0, Address(Z_thread, JavaThread::suspend_flags_offset())); |
2177 __ load_and_test_int(Z_R0, Address(Z_thread, JavaThread::suspend_flags_offset())); |
2179 __ z_bre(no_block); |
2178 __ z_bre(no_block); |
2180 |
2179 |