1088 // change thread state |
1088 // change thread state |
1089 NOT_LP64(__ get_thread(thread)); |
1089 NOT_LP64(__ get_thread(thread)); |
1090 __ movl(Address(thread, JavaThread::thread_state_offset()), |
1090 __ movl(Address(thread, JavaThread::thread_state_offset()), |
1091 _thread_in_native_trans); |
1091 _thread_in_native_trans); |
1092 |
1092 |
1093 if (os::is_MP()) { |
1093 if (UseMembar) { |
1094 if (UseMembar) { |
1094 // Force this write out before the read below |
1095 // Force this write out before the read below |
1095 __ membar(Assembler::Membar_mask_bits( |
1096 __ membar(Assembler::Membar_mask_bits( |
1096 Assembler::LoadLoad | Assembler::LoadStore | |
1097 Assembler::LoadLoad | Assembler::LoadStore | |
1097 Assembler::StoreLoad | Assembler::StoreStore)); |
1098 Assembler::StoreLoad | Assembler::StoreStore)); |
1098 } else { |
1099 } else { |
1099 // Write serialization page so VM thread can do a pseudo remote membar. |
1100 // Write serialization page so VM thread can do a pseudo remote membar. |
1100 // We use the current thread pointer to calculate a thread specific |
1101 // We use the current thread pointer to calculate a thread specific |
1101 // offset to write to within the page. This minimizes bus traffic |
1102 // offset to write to within the page. This minimizes bus traffic |
1102 // due to cache line collision. |
1103 // due to cache line collision. |
1103 __ serialize_memory(thread, rcx); |
1104 __ serialize_memory(thread, rcx); |
|
1105 } |
|
1106 } |
1104 } |
1107 |
1105 |
1108 #ifndef _LP64 |
1106 #ifndef _LP64 |
1109 if (AlwaysRestoreFPU) { |
1107 if (AlwaysRestoreFPU) { |
1110 // Make sure the control word is correct. |
1108 // Make sure the control word is correct. |