src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
Print this page
rev 7516 : 8069593: AARCH64: Changes to JavaThread::_thread_state must use acquire and release
Summary: Use release stores for all changes to thread state.
Reviewed-by: kvn
*** 1095,1105 ****
}
#endif
// Change state to native
__ mov(rscratch1, _thread_in_native);
! __ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
// Call the native method.
__ blrt(r10, rscratch1);
__ maybe_isb();
__ get_method(rmethod);
--- 1095,1106 ----
}
#endif
// Change state to native
__ mov(rscratch1, _thread_in_native);
! __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
! __ stlrw(rscratch1, rscratch2);
// Call the native method.
__ blrt(r10, rscratch1);
__ maybe_isb();
__ get_method(rmethod);
*** 1116,1126 ****
__ push(dtos);
__ push(ltos);
// change thread state
__ mov(rscratch1, _thread_in_native_trans);
! __ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
if (os::is_MP()) {
if (UseMembar) {
// Force this write out before the read below
__ dsb(Assembler::SY);
--- 1117,1128 ----
__ push(dtos);
__ push(ltos);
// change thread state
__ mov(rscratch1, _thread_in_native_trans);
! __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
! __ stlrw(rscratch1, rscratch2);
if (os::is_MP()) {
if (UseMembar) {
// Force this write out before the read below
__ dsb(Assembler::SY);
*** 1163,1173 ****
__ bind(Continue);
}
// change thread state
__ mov(rscratch1, _thread_in_Java);
! __ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
// reset_last_Java_frame
__ reset_last_Java_frame(true, true);
// reset handle block
--- 1165,1176 ----
__ bind(Continue);
}
// change thread state
__ mov(rscratch1, _thread_in_Java);
! __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
! __ stlrw(rscratch1, rscratch2);
// reset_last_Java_frame
__ reset_last_Java_frame(true, true);
// reset handle block