gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 54 of file decode_cache.hh.

Member Typedef Documentation

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

Definition at line 63 of file decode_cache.hh.

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

Definition at line 62 of file decode_cache.hh.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 115 of file decode_cache.hh.

Member Function Documentation

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 82 of file decode_cache.hh.

Referenced by DecodeCache::AddrMap< RefCountingPtr >::lookup().

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

Definition at line 121 of file decode_cache.hh.

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

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 71 of file decode_cache.hh.

Referenced by DecodeCache::AddrMap< RefCountingPtr >::getPage().

Member Data Documentation

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

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

Generated on Fri Jun 9 2017 13:04:30 for gem5 by doxygen 1.8.6