| 263 | |
| 264 | template <bool Write, int Bytes> |
| 265 | void* 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 | |
| 276 | template <typename Int> |
| 277 | void writeCache(u32 mem, Int value, bool validPFN) |
nothing calls this directly
no test coverage detected