gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
DecodeCache::AddrMap< Value > Class Template Reference

A sparse map from an Addr to a Value, stored in page chunks. More...

#include <decode_cache.hh>

Classes

struct  CachePage
 

Public Member Functions

 AddrMap ()
 Constructor. More...
 
Value & lookup (Addr addr)
 

Protected Types

typedef std::unordered_map< Addr, CachePage * > PageMap
 
typedef PageMap::iterator PageIt
 

Protected Member Functions

void update (PageIt recentest)
 Update the mini cache of recent lookups. More...
 
CachePagegetPage (Addr addr)
 Attempt to find the CacheePage which goes with a particular address. More...
 

Protected Attributes

PageIt recent [2]
 
PageMap pageMap
 

Detailed Description

template<class Value>
class DecodeCache::AddrMap< Value >

A sparse map from an Addr to a Value, stored in page chunks.

Definition at line 53 of file decode_cache.hh.

Member Typedef Documentation

◆ PageIt

template<class Value>
typedef PageMap::iterator DecodeCache::AddrMap< Value >::PageIt
protected

Definition at line 62 of file decode_cache.hh.

◆ PageMap

template<class Value>
typedef std::unordered_map<Addr, CachePage *> DecodeCache::AddrMap< Value >::PageMap
protected

Definition at line 61 of file decode_cache.hh.

Constructor & Destructor Documentation

◆ AddrMap()

template<class Value>
DecodeCache::AddrMap< Value >::AddrMap ( )
inline

Constructor.

Definition at line 114 of file decode_cache.hh.

Member Function Documentation

◆ getPage()

template<class Value>
CachePage* DecodeCache::AddrMap< Value >::getPage ( Addr  addr)
inlineprotected

Attempt to find the CacheePage which goes with a particular address.

First check the small cache of recent results, then actually look in the hash map.

Parameters
addrThe address to look up.

Definition at line 81 of file decode_cache.hh.

◆ lookup()

template<class Value>
Value& DecodeCache::AddrMap< Value >::lookup ( Addr  addr)
inline

Definition at line 120 of file decode_cache.hh.

Referenced by X86ISA::Decoder::doResetState().

◆ update()

template<class Value>
void DecodeCache::AddrMap< Value >::update ( PageIt  recentest)
inlineprotected

Update the mini cache of recent lookups.

Parameters
recentestThe most recent result;

Definition at line 70 of file decode_cache.hh.

Member Data Documentation

◆ pageMap

template<class Value>
PageMap DecodeCache::AddrMap< Value >::pageMap
protected

Definition at line 65 of file decode_cache.hh.

◆ recent

template<class Value>
PageIt DecodeCache::AddrMap< Value >::recent[2]
protected

Definition at line 64 of file decode_cache.hh.


The documentation for this class was generated from the following file:

Generated on Mon Jun 8 2020 15:45:35 for gem5 by doxygen 1.8.13