Skip to content

Commit

Permalink
SPU: Disable PUTLLC NOP transfers detection on TSX path
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 authored and AniLeo committed Jul 9, 2020
1 parent f8dbfa1 commit 84470c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/PPUThread.cpp
Expand Up @@ -1227,7 +1227,7 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, T reg_value)
const T old_data = static_cast<T>(ppu.rdata << ((addr & 7) * 8) >> size_off);
auto& res = vm::reservation_acquire(addr, sizeof(T));

if (std::exchange(ppu.raddr, 0) != addr || addr % sizeof(T) || old_data != data || ppu.rtime != res)
if (std::exchange(ppu.raddr, 0) != addr || addr % sizeof(T) || old_data != data || ppu.rtime != (res & -128))
{
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/SPUThread.cpp
Expand Up @@ -2021,7 +2021,7 @@ bool spu_thread::process_mfc_cmd()
if (raddr && raddr != addr)
{
// Last check for event before we replace the reservation with a new one
if (vm::reservation_acquire(raddr, 128) != rtime || !cmp_rdata(rdata, vm::_ref<decltype(rdata)>(raddr)))
if ((vm::reservation_acquire(raddr, 128) & -128) != rtime || !cmp_rdata(rdata, vm::_ref<decltype(rdata)>(raddr)))
{
ch_event_stat |= SPU_EVENT_LR;
}
Expand Down Expand Up @@ -2063,7 +2063,7 @@ bool spu_thread::process_mfc_cmd()
return false;
}

if (cmp_rdata(to_write, rdata))
if (!g_use_rtm && cmp_rdata(to_write, rdata))
{
// Writeback of unchanged data. Only check memory change
return cmp_rdata(rdata, vm::_ref<decltype(rdata)>(addr)) && res.compare_and_swap_test(rtime, rtime + 128);
Expand Down

0 comments on commit 84470c3

Please sign in to comment.