gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::RegId Class Reference

Register ID: describe an architectural register with its class and index. More...

#include <reg_class.hh>

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

Public Member Functions

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
 

Protected Attributes

const RegClass_regClass = nullptr
 
RegIndex regIdx
 
int numPinnedWrites
 

Friends

struct std::hash< RegId >
 
class RegClassIterator
 
std::ostream & operator<< (std::ostream &os, const RegId &rid)
 
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

Register ID: describe an architectural register with its class and index.

This structure is used instead of just the register index to disambiguate between different classes of registers. For example, a integer register with index 3 is represented by Regid(IntRegClass, 3).

Definition at line 93 of file reg_class.hh.

Constructor & Destructor Documentation

◆ RegId() [1/2]

gem5::RegId::RegId ( )
inlineconstexpr

Definition at line 272 of file reg_class.hh.

◆ RegId() [2/2]

gem5::RegId::RegId ( const RegClass & reg_class,
RegIndex reg_idx )
inlineconstexpr

Definition at line 106 of file reg_class.hh.

Member Function Documentation

◆ className()

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

Return a const char* with the register class name.

Definition at line 281 of file reg_class.hh.

References _regClass, and gem5::RegClass::name().

Referenced by gem5::o3::Rename::renameDestRegs(), gem5::o3::Rename::renameSrcRegs(), and gem5::o3::ElasticTrace::updateRegDep().

◆ classValue()

◆ flatten()

◆ getNumPinnedWrites()

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

Definition at line 162 of file reg_class.hh.

References numPinnedWrites.

Referenced by gem5::o3::SimpleRenameMap::rename(), and gem5::o3::Rename::renameDestRegs().

◆ index()

◆ is()

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

Definition at line 275 of file reg_class.hh.

References _regClass, and gem5::RegClass::type().

Referenced by gem5::o3::SimpleRenameMap::rename(), and gem5::o3::ElasticTrace::updateRegDep().

◆ isFlat()

bool gem5::RegId::isFlat ( ) const
inlineconstexpr

Definition at line 283 of file reg_class.hh.

References _regClass, and gem5::RegClass::isFlat().

◆ isRenameable()

bool gem5::RegId::isRenameable ( ) const
inlineconstexpr

◆ operator RegIndex()

gem5::RegId::operator RegIndex ( ) const
inlineconstexpr

Definition at line 110 of file reg_class.hh.

References index().

◆ operator!=()

bool gem5::RegId::operator!= ( const RegId & that) const
inlineconstexpr

Definition at line 122 of file reg_class.hh.

Referenced by gem5::PhysRegId::operator!=().

◆ operator<()

bool gem5::RegId::operator< ( const RegId & that) const
inlineconstexpr

Order operator.

The order is required to implement maps with key type RegId

Definition at line 130 of file reg_class.hh.

References classValue(), index(), and regIdx.

Referenced by gem5::PhysRegId::operator<().

◆ operator==()

bool gem5::RegId::operator== ( const RegId & that) const
inlineconstexpr

Definition at line 116 of file reg_class.hh.

References classValue(), index(), and regIdx.

Referenced by gem5::PhysRegId::operator==().

◆ regClass()

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

Class accessor.

Definition at line 154 of file reg_class.hh.

References _regClass.

Referenced by gem5::o3::DynInst::forwardOldRegs(), gem5::CheckerCPU::setRegOperand(), and gem5::CheckerCPU::setRegOperand().

◆ setNumPinnedWrites()

void gem5::RegId::setNumPinnedWrites ( int num_writes)
inline

Definition at line 163 of file reg_class.hh.

References numPinnedWrites.

Referenced by gem5::o3::Rename::renameDestRegs().

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const RegId & rid )
friend

Definition at line 290 of file reg_class.hh.

◆ RegClassIterator

friend class RegClassIterator
friend

Definition at line 101 of file reg_class.hh.

◆ std::hash< RegId >

friend struct std::hash< RegId >
friend

Definition at line 98 of file reg_class.hh.

Member Data Documentation

◆ _regClass

const RegClass* gem5::RegId::_regClass = nullptr
protected

Definition at line 96 of file reg_class.hh.

Referenced by className(), classValue(), flatten(), is(), isFlat(), and regClass().

◆ numPinnedWrites

◆ regIdx

RegIndex gem5::RegId::regIdx
protected

Definition at line 97 of file reg_class.hh.

Referenced by index(), operator<(), and operator==().


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

Generated on Tue Jun 18 2024 16:24:13 for gem5 by doxygen 1.11.0