Partial revert of 3be687cd1813648f7ccb38df930fcc6909cac052

This commit is contained in:
Eladash 2020-04-28 19:48:44 +03:00 committed by Ivan
parent 98ab5d5ba2
commit a505d87565
2 changed files with 5 additions and 16 deletions

View File

@ -1045,21 +1045,10 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
} }
}()) }())
{ {
ppu.rtime = vm::reservation_acquire(addr, sizeof(T)); ppu.rtime = vm::reservation_acquire(addr, sizeof(T)) & -128;
if (ppu.rtime & 127)
{
if (!(ppu.state & cpu_flag::wait))
{
ppu.state += cpu_flag::wait;
}
continue;
}
ppu.rdata = data; ppu.rdata = data;
if (vm::reservation_acquire(addr, sizeof(T)) == ppu.rtime) [[likely]] if ((vm::reservation_acquire(addr, sizeof(T)) & -128) == ppu.rtime) [[likely]]
{ {
ppu.test_stopped(); ppu.test_stopped();

View File

@ -1784,9 +1784,9 @@ bool spu_thread::process_mfc_cmd()
for (u64 i = 0;; [&]() for (u64 i = 0;; [&]()
{ {
if (ntime & 127 && g_use_rtm && !(state & cpu_flag::wait)) if (is_paused())
{ {
state += cpu_flag::wait; check_state();
} }
if (++i < 25) [[likely]] if (++i < 25) [[likely]]
@ -1813,7 +1813,7 @@ bool spu_thread::process_mfc_cmd()
ntime != time0) ntime != time0)
{ {
// Reservation data has been modified recently // Reservation data has been modified recently
if (time0 & 127) i += 12, ntime = time0; if (time0 & 127) i += 12;
continue; continue;
} }