gem5 v24.0.0.0
|
A sparse map from an Addr to a Value, stored in page chunks. More...
#include <decode_cache.hh>
Classes | |
struct | CacheChunk |
Public Member Functions | |
AddrMap () | |
Constructor. | |
Value & | lookup (Addr addr) |
Protected Types | |
typedef std::unordered_map< Addr, CacheChunk * > | ChunkMap |
typedef ChunkMap::iterator | ChunkIt |
Protected Member Functions | |
void | update (ChunkIt recentest) |
Update the mini cache of recent lookups. | |
CacheChunk * | getChunk (Addr addr) |
Attempt to find the CacheChunk which goes with a particular address. | |
Static Protected Member Functions | |
static constexpr Addr | chunkOffset (Addr addr) |
static constexpr Addr | chunkStart (Addr addr) |
Protected Attributes | |
ChunkIt | recent [2] |
ChunkMap | chunkMap |
Static Protected Attributes | |
static constexpr Addr | CacheChunkBytes = 1ULL << CacheChunkShift |
A sparse map from an Addr to a Value, stored in page chunks.
Definition at line 50 of file decode_cache.hh.
|
protected |
Definition at line 74 of file decode_cache.hh.
|
protected |
Definition at line 73 of file decode_cache.hh.
|
inline |
Constructor.
Definition at line 125 of file decode_cache.hh.
References gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkMap, and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::recent.
|
inlinestaticconstexprprotected |
Definition at line 56 of file decode_cache.hh.
References gem5::X86ISA::addr, and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::CacheChunkBytes.
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::lookup().
|
inlinestaticconstexprprotected |
Definition at line 62 of file decode_cache.hh.
References gem5::X86ISA::addr, and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::CacheChunkBytes.
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk().
|
inlineprotected |
Attempt to find the CacheChunk which goes with a particular address.
First check the small cache of recent results, then actually look in the hash map.
addr | The address to look up. |
Definition at line 93 of file decode_cache.hh.
References gem5::X86ISA::addr, gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkMap, gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkStart(), gem5::decode_cache::AddrMap< Value, CacheChunkShift >::recent, and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::update().
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::lookup().
|
inline |
Definition at line 131 of file decode_cache.hh.
References gem5::X86ISA::addr, gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkOffset(), gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk(), and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::CacheChunk::items.
Referenced by gem5::X86ISA::Decoder::doResetState().
|
inlineprotected |
Update the mini cache of recent lookups.
recentest | The most recent result; |
Definition at line 82 of file decode_cache.hh.
References gem5::decode_cache::AddrMap< Value, CacheChunkShift >::recent.
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk().
|
staticconstexprprotected |
Definition at line 53 of file decode_cache.hh.
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkOffset(), and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkStart().
|
protected |
Definition at line 77 of file decode_cache.hh.
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::AddrMap(), and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk().
|
protected |
Definition at line 76 of file decode_cache.hh.
Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::AddrMap(), gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk(), and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::update().