31 #ifndef __CPU_DECODE_CACHE_HH__
32 #define __CPU_DECODE_CACHE_HH__
34 #include <unordered_map>
36 #include "arch/isa_traits.hh"
37 #include "arch/types.hh"
38 #include "config/the_isa.hh"
50 typedef std::unordered_map<TheISA::ExtMachInst, StaticInstPtr>
InstMap;
62 typedef typename std::unordered_map<Addr, CachePage *>
PageMap;
63 typedef typename PageMap::iterator
PageIt;
88 if (
recent[0]->first == page_addr)
91 recent[1]->first == page_addr) {
106 CachePage *newPage =
new CachePage;
108 typename PageMap::value_type to_insert(page_addr, newPage);
123 CachePage *page =
getPage(addr);
130 #endif // __CPU_DECODE_CACHE_HH__
Value & lookup(Addr addr)
std::unordered_map< TheISA::ExtMachInst, StaticInstPtr > InstMap
Hash for decoded instructions.
void update(PageIt recentest)
Update the mini cache of recent lookups.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Value items[TheISA::PageBytes]
A sparse map from an Addr to a Value, stored in page chunks.
CachePage * getPage(Addr addr)
Attempt to find the CacheePage which goes with a particular address.
std::unordered_map< Addr, CachePage * > PageMap