gem5 v25.0.0.1
Loading...
Searching...
No Matches
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.
bool isFixedMapping () const
 Returns true if this register is always associated to the same architectural register.
const RegIndexflatIndex () const
 Flat index accessor.
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.
bool operator== (const PhysRegId &that) const
bool operator!= (const PhysRegId &that) const
constexpr RegIndex index () const
 Visible RegId methods.
constexpr const RegClassregClass () const
 Class accessor.
constexpr RegClassType classValue () const
constexpr const char * className () const
 Return a const char* with the register class name.
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.
constexpr bool isRenameable () const
 Return true if this register can be renamed.
constexpr bool is (RegClassType reg_class) const
constexpr RegIndex index () const
 Index accessors.
constexpr const RegClassregClass () const
 Class accessor.
constexpr RegClassType classValue () const
constexpr const char * className () const
 Return a const char* with the register class name.
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 414 of file reg_class.hh.

Constructor & Destructor Documentation

◆ PhysRegId() [1/2]

gem5::PhysRegId::PhysRegId ( )
inlineexplicit

◆ PhysRegId() [2/2]

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

Scalar PhysRegId constructor.

Definition at line 427 of file reg_class.hh.

References flatIdx, numPinnedWritesToComplete, pinned, and gem5::RegId::RegId().

Member Function Documentation

◆ className()

const char * gem5::RegId::className ( ) const
inlineconstexpr

◆ classValue()

◆ decrNumPinnedWrites()

void gem5::PhysRegId::decrNumPinnedWrites ( )
inline

Definition at line 489 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

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

◆ decrNumPinnedWritesToComplete()

void gem5::PhysRegId::decrNumPinnedWritesToComplete ( )
inline

Definition at line 506 of file reg_class.hh.

References numPinnedWritesToComplete.

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

◆ flatIndex()

◆ getNumPinnedWrites()

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

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

References numPinnedWritesToComplete.

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

◆ incrNumPinnedWrites()

void gem5::PhysRegId::incrNumPinnedWrites ( )
inline

Definition at line 490 of file reg_class.hh.

References gem5::RegId::numPinnedWrites.

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

◆ incrNumPinnedWritesToComplete()

void gem5::PhysRegId::incrNumPinnedWritesToComplete ( )
inline

Definition at line 507 of file reg_class.hh.

References numPinnedWritesToComplete.

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

◆ index()

◆ is()

bool gem5::RegId::is ( RegClassType reg_class) const
inlineconstexpr
Returns
true if it is of the specified class.

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

References gem5::RegId::operator!=(), and PhysRegId().

◆ operator<()

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

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

Definition at line 446 of file reg_class.hh.

References gem5::RegId::operator<(), and PhysRegId().

◆ operator==()

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

Definition at line 453 of file reg_class.hh.

References gem5::RegId::operator==(), and PhysRegId().

◆ regClass()

const RegClass & gem5::RegId::regClass ( ) const
inlineconstexpr

Class accessor.

Definition at line 154 of file reg_class.hh.

◆ setNumPinnedWrites()

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

Definition at line 477 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 501 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 417 of file reg_class.hh.

Referenced by flatIndex(), PhysRegId(), and PhysRegId().

◆ numPinnedWritesToComplete

int gem5::PhysRegId::numPinnedWritesToComplete
private

◆ pinned

bool gem5::PhysRegId::pinned
private

Definition at line 419 of file reg_class.hh.

Referenced by isPinned(), PhysRegId(), and setNumPinnedWrites().


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

Generated on Sat Oct 18 2025 08:06:53 for gem5 by doxygen 1.14.0