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

Function doCacheHitOp

pcsx2/Cache.cpp:358–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357template <typename Op>
358void doCacheHitOp(u32 addr, const char* name, Op op)
359{
360 const int index = cache.setIdxFor(addr);
361 CacheSet& set = cache.sets[index];
362 VTLBVirtual vmv = vtlbdata.vmap[addr >> VTLB_PAGE_BITS];
363 uptr ppf = vmv.assumePtr(addr);
364 int way;
365
366 if (!findInCache(set, ppf, &way))
367 {
368 CACHE_LOG("CACHE %s NO HIT addr %x, index %d, tag0 %zx tag1 %zx", name, addr, index, set.tags[0].rawValue, set.tags[1].rawValue);
369 return;
370 }
371
372 CACHE_LOG("CACHE %s addr %x, index %d, way %d, flags %x OP %x", name, addr, index, way, set.tags[way].flags(), cpuRegs.code);
373
374 op(cache.lineAt(index, way));
375}
376
377namespace R5900
378{

Callers 1

CACHEFunction · 0.85

Calls 5

findInCacheFunction · 0.85
setIdxForMethod · 0.80
lineAtMethod · 0.80
assumePtrMethod · 0.45
flagsMethod · 0.45

Tested by

no test coverage detected