gem5  v22.1.0.0
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 (const RegClass &reg_class, RegIndex _regIdx, RegIndex _flatIdx)
 Scalar PhysRegId constructor. 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
 
constexpr RegIndex index () const
 Visible RegId methods. More...
 
constexpr const RegClassregClass () const
 Class accessor. More...
 
constexpr RegClassType classValue () const
 
constexpr const char * className () const
 Return a const char* with the register class name. More...
 
constexpr bool is (RegClassType reg_class) const
 

Private Attributes

RegIndex flatIdx
 
int numPinnedWritesToComplete
 
bool pinned
 
- Private Attributes inherited from gem5::RegId
const RegClass_regClass = nullptr
 
RegIndex regIdx
 
int numPinnedWrites
 

Additional Inherited Members

- Private Member Functions inherited from gem5::RegId
constexpr RegId ()
 
constexpr RegId (const RegClass &reg_class, RegIndex reg_idx)
 
constexpr operator RegIndex () const
 
constexpr bool operator== (const RegId &that) const
 
constexpr bool operator!= (const RegId &that) const
 
constexpr bool operator< (const RegId &that) const
 Order operator. More...
 
constexpr bool isRenameable () const
 Return true if this register can be renamed. More...
 
constexpr bool is (RegClassType reg_class) const
 
constexpr RegIndex index () const
 Index accessors. More...
 
constexpr const RegClassregClass () const
 Class accessor. More...
 
constexpr RegClassType classValue () const
 
constexpr const char * className () const
 Return a const char* with the register class name. More...
 
constexpr bool isFlat () const
 
RegId flatten (const BaseISA &isa) const
 
int getNumPinnedWrites () const
 
void setNumPinnedWrites (int num_writes)
 

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 391 of file reg_class.hh.

Constructor & Destructor Documentation

◆ PhysRegId() [1/2]

gem5::PhysRegId::PhysRegId ( )
inlineexplicit

Definition at line 399 of file reg_class.hh.

◆ PhysRegId() [2/2]

gem5::PhysRegId::PhysRegId ( const RegClass reg_class,
RegIndex  _regIdx,
RegIndex  _flatIdx 
)
inlineexplicit

Scalar PhysRegId constructor.

Definition at line 404 of file reg_class.hh.

Member Function Documentation

◆ className()

constexpr const char * gem5::RegId::className
inlineconstexpr

◆ classValue()

constexpr RegClassType gem5::RegId::classValue
inlineconstexpr

◆ decrNumPinnedWrites()

void gem5::PhysRegId::decrNumPinnedWrites ( )
inline

Definition at line 466 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

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

◆ decrNumPinnedWritesToComplete()

void gem5::PhysRegId::decrNumPinnedWritesToComplete ( )
inline

Definition at line 483 of file reg_class.hh.

References numPinnedWritesToComplete.

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

◆ flatIndex()

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

◆ getNumPinnedWrites()

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

Definition at line 451 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 472 of file reg_class.hh.

References numPinnedWritesToComplete.

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

◆ incrNumPinnedWrites()

void gem5::PhysRegId::incrNumPinnedWrites ( )
inline

Definition at line 467 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

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

◆ incrNumPinnedWritesToComplete()

void gem5::PhysRegId::incrNumPinnedWritesToComplete ( )
inline

Definition at line 484 of file reg_class.hh.

References numPinnedWritesToComplete.

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

◆ index()

constexpr RegIndex gem5::RegId::index
inlineconstexpr

◆ is()

constexpr bool gem5::RegId::is
inlineconstexpr
Returns
true if it is of the specified class.

Definition at line 144 of file reg_class.hh.

Referenced by gem5::o3::SimpleRenameMap::rename(), and gem5::o3::UnifiedRenameMap::setEntry().

◆ 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 436 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 423 of file reg_class.hh.

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

◆ operator==()

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

Definition at line 430 of file reg_class.hh.

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

◆ regClass()

constexpr const RegClass& gem5::RegId::regClass
inlineconstexpr

Class accessor.

Definition at line 151 of file reg_class.hh.

◆ setNumPinnedWrites()

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

Definition at line 454 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 478 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 394 of file reg_class.hh.

Referenced by flatIndex().

◆ numPinnedWritesToComplete

int gem5::PhysRegId::numPinnedWritesToComplete
private

◆ pinned

bool gem5::PhysRegId::pinned
private

Definition at line 396 of file reg_class.hh.

Referenced by isPinned(), and setNumPinnedWrites().


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

Generated on Wed Dec 21 2022 10:23:13 for gem5 by doxygen 1.9.1