Skip to content

Commit

Permalink
Partial revert of 3be687c
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Apr 28, 2020
1 parent 98ab5d5 commit 931fb1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
15 changes: 2 additions & 13 deletions rpcs3/Emu/Cell/PPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1045,21 +1045,10 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
}
}())
{
ppu.rtime = vm::reservation_acquire(addr, sizeof(T));

if (ppu.rtime & 127)
{
if (!(ppu.state & cpu_flag::wait))
{
ppu.state += cpu_flag::wait;
}

continue;
}

ppu.rtime = vm::reservation_acquire(addr, sizeof(T)) & -128;
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();

Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/Cell/SPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1784,9 +1784,9 @@ bool spu_thread::process_mfc_cmd()

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]]
Expand All @@ -1813,7 +1813,7 @@ bool spu_thread::process_mfc_cmd()
ntime != time0)
{
// Reservation data has been modified recently
if (time0 & 127) i += 12, ntime = time0;
if (time0 & 127) i += 12;
continue;
}

Expand Down

0 comments on commit 931fb1f

Please sign in to comment.