MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / CacheSnapshot

Class CacheSnapshot

crates/virtual-machine/src/memory/cache.rs:377–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375impl<Next: MemoryAccess + PeekByteRaw> PeekByteRaw for Cache<Next> {
376 fn peek_byte_raw(&self, addr: u64) -> Option<u8> {
377 let (tag, index, offset) = self.address_fields(addr);
378 let set_idx = index as usize;
379 if let Some(set) = self.sets.get(set_idx) {
380 for line in &set.ways {
381 if line.valid && line.tag == tag {
382 return line.data.get(offset as usize).copied();
383 }
384 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected