MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / prepareCacheAccess

Function prepareCacheAccess

pcsx2/Cache.cpp:265–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263
264template <bool Write, int Bytes>
265void* prepareCacheAccess(u32 mem, int* way, int* idx, bool validPFN = true)
266{
267 *way = 0;
268 *idx = getFreeCache(mem, way, validPFN);
269 CacheLine line = cache.lineAt(*idx, *way);
270 if (Write)
271 line.tag.setDirty();
272 u32 aligned = mem & ~(Bytes - 1);
273 return &line.data.bytes[aligned & 0x3f];
274}
275
276template <typename Int>
277void writeCache(u32 mem, Int value, bool validPFN)

Callers

nothing calls this directly

Calls 3

getFreeCacheFunction · 0.85
lineAtMethod · 0.80
setDirtyMethod · 0.80

Tested by

no test coverage detected