gem5  v21.2.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
gem5::PhysRegId Class Reference

Physical register ID. More...

#include <reg_class.hh>

Inheritance diagram for gem5::PhysRegId:
gem5::RegId

Public Member Functions

 PhysRegId ()
 
 PhysRegId (RegClassType _regClass, RegIndex _regIdx, RegIndex _flatIdx)
 Scalar PhysRegId constructor. More...
 
 PhysRegId (RegClassType _regClass, RegIndex _regIdx, ElemIndex elem_idx, RegIndex flat_idx)
 Vector PhysRegId constructor (w/ elemIndex). More...
 
bool isFixedMapping () const
 Returns true if this register is always associated to the same architectural register. More...
 
const RegIndexflatIndex () const
 Flat index accessor. More...
 
int getNumPinnedWrites () const
 
void setNumPinnedWrites (int numWrites)
 
void decrNumPinnedWrites ()
 
void incrNumPinnedWrites ()
 
bool isPinned () const
 
int getNumPinnedWritesToComplete () const
 
void setNumPinnedWritesToComplete (int numWrites)
 
void decrNumPinnedWritesToComplete ()
 
void incrNumPinnedWritesToComplete ()
 
bool operator< (const PhysRegId &that) const
 Explicit forward methods, to prevent comparisons of PhysRegId with RegIds. More...
 
bool operator== (const PhysRegId &that) const
 
bool operator!= (const PhysRegId &that) const
 
RegIndex index () const
 Visible RegId methods. More...
 
RegClassType classValue () const
 Class accessor. More...
 
const char * className () const
 Return a const char* with the register class name. More...
 
RegIndex elemIndex () const
 Elem accessor. More...
 
bool is (RegClassType reg_class) const
 

Static Public Member Functions

static PhysRegId elemId (PhysRegId *vid, ElemIndex elem)
 

Private Attributes

RegIndex flatIdx
 
int numPinnedWritesToComplete
 
bool pinned
 
- Private Attributes inherited from gem5::RegId
RegClassType regClass
 
RegIndex regIdx
 
ElemIndex elemIdx
 
int numPinnedWrites
 

Additional Inherited Members

- Private Member Functions inherited from gem5::RegId
 RegId ()
 
 RegId (RegClassType reg_class, RegIndex reg_idx)
 
 RegId (RegClassType reg_class, RegIndex reg_idx, ElemIndex elem_idx)
 
bool operator== (const RegId &that) const
 
bool operator!= (const RegId &that) const
 
bool operator< (const RegId &that) const
 Order operator. More...
 
bool isRenameable () const
 Return true if this register can be renamed. More...
 
bool is (RegClassType reg_class) const
 
RegIndex elemIndex () const
 Elem accessor. More...
 
RegClassType classValue () const
 Class accessor. More...
 
const char * className () const
 Return a const char* with the register class name. More...
 
int getNumPinnedWrites () const
 
void setNumPinnedWrites (int num_writes)
 
RegIndex index () const
 Index accessors. More...
 
RegIndex flatIndex () const
 Index flattening. More...
 
- Static Private Attributes inherited from gem5::RegId
static const char * regClassStrings []
 
static constexpr size_t Scale = TheISA::NumVecElemPerVecReg
 

Detailed Description

Physical register ID.

Like a register ID but physical. The inheritance is private because the only relationship between this types is functional, and it is done to prevent code replication.

Definition at line 224 of file reg_class.hh.

Constructor & Destructor Documentation

◆ PhysRegId() [1/3]

gem5::PhysRegId::PhysRegId ( )
inlineexplicit

Definition at line 232 of file reg_class.hh.

Referenced by elemId().

◆ PhysRegId() [2/3]

gem5::PhysRegId::PhysRegId ( RegClassType  _regClass,
RegIndex  _regIdx,
RegIndex  _flatIdx 
)
inlineexplicit

Scalar PhysRegId constructor.

Definition at line 237 of file reg_class.hh.

◆ PhysRegId() [3/3]

gem5::PhysRegId::PhysRegId ( RegClassType  _regClass,
RegIndex  _regIdx,
ElemIndex  elem_idx,
RegIndex  flat_idx 
)
inlineexplicit

Vector PhysRegId constructor (w/ elemIndex).

Definition at line 244 of file reg_class.hh.

Member Function Documentation

◆ className()

const char* gem5::RegId::className
inline

◆ classValue()

RegClassType gem5::RegId::classValue
inline

Class accessor.

Definition at line 206 of file reg_class.hh.

Referenced by gem5::o3::UnifiedFreeList::addReg().

◆ decrNumPinnedWrites()

void gem5::PhysRegId::decrNumPinnedWrites ( )
inline

Definition at line 313 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

Referenced by gem5::o3::SimpleRenameMap::rename().

◆ decrNumPinnedWritesToComplete()

void gem5::PhysRegId::decrNumPinnedWritesToComplete ( )
inline

Definition at line 330 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by gem5::o3::InstructionQueue::wakeDependents().

◆ elemId()

static PhysRegId gem5::PhysRegId::elemId ( PhysRegId vid,
ElemIndex  elem 
)
inlinestatic

Definition at line 292 of file reg_class.hh.

References index(), is(), PhysRegId(), gem5::VecElemClass, and gem5::VecRegClass.

◆ elemIndex()

RegIndex gem5::RegId::elemIndex
inline

Elem accessor.

Definition at line 204 of file reg_class.hh.

Referenced by gem5::o3::PhysRegFile::readVecElem(), and gem5::o3::PhysRegFile::setVecElem().

◆ flatIndex()

const RegIndex& gem5::PhysRegId::flatIndex ( ) const
inline

◆ getNumPinnedWrites()

int gem5::PhysRegId::getNumPinnedWrites ( ) const
inline

Definition at line 298 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

Referenced by gem5::o3::SimpleRenameMap::rename().

◆ getNumPinnedWritesToComplete()

int gem5::PhysRegId::getNumPinnedWritesToComplete ( ) const
inline

Definition at line 319 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by gem5::o3::InstructionQueue::wakeDependents().

◆ incrNumPinnedWrites()

void gem5::PhysRegId::incrNumPinnedWrites ( )
inline

Definition at line 314 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

Referenced by gem5::o3::DynInst::setSquashed().

◆ incrNumPinnedWritesToComplete()

void gem5::PhysRegId::incrNumPinnedWritesToComplete ( )
inline

Definition at line 331 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by gem5::o3::DynInst::setSquashed().

◆ index()

RegIndex gem5::RegId::index
inline

◆ is()

bool gem5::RegId::is
inline

◆ isFixedMapping()

bool gem5::PhysRegId::isFixedMapping ( ) const
inline

◆ isPinned()

bool gem5::PhysRegId::isPinned ( ) const
inline

◆ operator!=()

bool gem5::PhysRegId::operator!= ( const PhysRegId that) const
inline

Definition at line 276 of file reg_class.hh.

References gem5::RegId::operator!=().

◆ operator<()

bool gem5::PhysRegId::operator< ( const PhysRegId that) const
inline

Explicit forward methods, to prevent comparisons of PhysRegId with RegIds.

Definition at line 264 of file reg_class.hh.

References gem5::RegId::operator<().

◆ operator==()

bool gem5::PhysRegId::operator== ( const PhysRegId that) const
inline

Definition at line 270 of file reg_class.hh.

References gem5::RegId::operator==().

◆ setNumPinnedWrites()

void gem5::PhysRegId::setNumPinnedWrites ( int  numWrites)
inline

Definition at line 301 of file reg_class.hh.

References gem5::RegId::numPinnedWrites, and pinned.

Referenced by gem5::o3::SimpleRenameMap::rename().

◆ setNumPinnedWritesToComplete()

void gem5::PhysRegId::setNumPinnedWritesToComplete ( int  numWrites)
inline

Definition at line 325 of file reg_class.hh.

References numPinnedWritesToComplete.

Referenced by gem5::o3::SimpleRenameMap::rename().

Member Data Documentation

◆ flatIdx

RegIndex gem5::PhysRegId::flatIdx
private

Definition at line 227 of file reg_class.hh.

Referenced by flatIndex().

◆ numPinnedWritesToComplete

int gem5::PhysRegId::numPinnedWritesToComplete
private

◆ pinned

bool gem5::PhysRegId::pinned
private

Definition at line 229 of file reg_class.hh.

Referenced by isPinned(), and setNumPinnedWrites().


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

Generated on Tue Dec 21 2021 11:35:08 for gem5 by doxygen 1.8.17