SPU: fix atomicity of inaccurate GETLLAR

This commit is contained in:
Elad Ashkenazi 2022-09-30 09:12:42 +03:00 committed by Ivan
parent 8170b91f76
commit 0cc981ec18

View File

@ -3451,7 +3451,7 @@ bool spu_thread::process_mfc_cmd()
// Need to check twice for it to be accurate, the code is before and not after this check for:
// 1. Reduce time between reservation accesses so TSX panelty would be lowered
// 2. Increase the chance of change detection: if GETLLAR has been called again new data is probably wanted
if (!g_cfg.core.spu_accurate_getllar || (rtime == vm::reservation_acquire(addr) && cmp_rdata(rdata, data)))
if (rtime == vm::reservation_acquire(addr) && (!g_cfg.core.spu_accurate_getllar || cmp_rdata(rdata, data)))
{
if ([&]() -> bool
{