29#ifndef __CPU_DECODE_CACHE_HH__
30#define __CPU_DECODE_CACHE_HH__
32#include <unordered_map>
45template <
typename EMI>
46using InstMap = std::unordered_map<EMI, StaticInstPtr>;
49template<
class Value, Addr CacheChunkShift = 12>
73 typedef typename std::unordered_map<Addr, CacheChunk *>
ChunkMap;
74 typedef typename ChunkMap::iterator
ChunkIt;
99 if (
recent[0]->first == chunk_addr)
102 recent[1]->first == chunk_addr) {
118 typename ChunkMap::value_type to_insert(chunk_addr, newChunk);
A sparse map from an Addr to a Value, stored in page chunks.
static constexpr Addr chunkOffset(Addr addr)
CacheChunk * getChunk(Addr addr)
Attempt to find the CacheChunk which goes with a particular address.
static constexpr Addr chunkStart(Addr addr)
void update(ChunkIt recentest)
Update the mini cache of recent lookups.
ChunkMap::iterator ChunkIt
std::unordered_map< Addr, CacheChunk * > ChunkMap
static constexpr Addr CacheChunkBytes
Value & lookup(Addr addr)
std::unordered_map< EMI, StaticInstPtr > InstMap
Hash for decoded instructions.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Value items[CacheChunkBytes]