Merge pull request #11559 from Pokechu22/cache-fix-plru-updates

PPCCache: Update PLRU on any cache access
This commit is contained in:
Admiral H. Curtiss 2023-02-14 00:50:54 +01:00 committed by GitHub
commit e2d7b6d079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -269,12 +269,12 @@ std::pair<u32, u32> Cache::GetCache(u32 addr, bool locked)
addrs[set][way] = addr;
valid[set] |= (1 << way);
modified[set] &= ~(1 << way);
// update plru
if (way != 0xff)
plru[set] = (plru[set] & ~s_plru_mask[way]) | s_plru_value[way];
}
// update plru
if (way != 0xff)
plru[set] = (plru[set] & ~s_plru_mask[way]) | s_plru_value[way];
return {set, way};
}