gem5
v20.1.0.0
|
Register ID: describe an architectural register with its class and index. More...
#include <reg_class.hh>
Public Member Functions | |
RegId () | |
RegId (RegClass reg_class, RegIndex reg_idx) | |
RegId (RegClass 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 | isZeroReg () const |
Check if this is the zero register. More... | |
bool | isIntReg () const |
bool | isFloatReg () const |
bool | isVecReg () const |
@Return true if it is a condition-code physical register. More... | |
bool | isVecElem () const |
@Return true if it is a condition-code physical register. More... | |
bool | isVecPredReg () const |
@Return true if it is a predicate physical register. More... | |
bool | isCCReg () const |
@Return true if it is a condition-code physical register. More... | |
bool | isMiscReg () const |
@Return true if it is a condition-code physical register. More... | |
bool | isRenameable () |
Return true if this register can be renamed. More... | |
const RegIndex & | elemIndex () const |
Elem accessor. More... | |
const RegClass & | 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) |
const RegIndex & | index () const |
Index accessors. More... | |
RegIndex & | index () |
RegIndex | flatIndex () const |
Index flattening. More... | |
Protected Attributes | |
RegClass | regClass |
RegIndex | regIdx |
ElemIndex | elemIdx |
int | numPinnedWrites |
Static Protected Attributes | |
static const char * | regClassStrings [] |
static constexpr size_t | Scale = TheISA::NumVecElemPerVecReg |
Friends | |
struct | std::hash< RegId > |
std::ostream & | operator<< (std::ostream &os, const RegId &rid) |
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 75 of file reg_class.hh.
|
inline |
Definition at line 87 of file reg_class.hh.
Definition at line 89 of file reg_class.hh.
Definition at line 92 of file reg_class.hh.
References elemIdx, ILLEGAL_ELEM_INDEX, panic_if, regClass, and VecElemClass.
|
inline |
Return a const char* with the register class name.
Definition at line 202 of file reg_class.hh.
References regClass, and regClassStrings.
Referenced by UnifiedRenameMap::lookup(), UnifiedRenameMap::rename(), DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::renameSrcRegs(), UnifiedRenameMap::setEntry(), and ElasticTrace::updateRegDep().
|
inline |
Class accessor.
Definition at line 200 of file reg_class.hh.
References regClass.
Referenced by Checker< O3CPUImpl >::copyResult(), X86ISA::ISA::flattenRegId(), SparcISA::ISA::flattenRegId(), ArmISA::ISA::flattenRegId(), BaseO3DynInst< Impl >::forwardOldRegs(), UnifiedRenameMap::lookup(), operator<(), operator==(), UnifiedRenameMap::rename(), DefaultRename< Impl >::renameSrcRegs(), and UnifiedRenameMap::setEntry().
|
inline |
Elem accessor.
Definition at line 198 of file reg_class.hh.
References elemIdx.
Referenced by ArmISA::ISA::flattenRegId(), operator<(), and operator==().
|
inline |
Index flattening.
Required to be able to use a vector for the register mapping.
Definition at line 179 of file reg_class.hh.
References CCRegClass, elemIdx, FloatRegClass, IntRegClass, MiscRegClass, panic, regClass, regIdx, Scale, VecElemClass, VecPredRegClass, and VecRegClass.
Referenced by SimpleRenameMap::lookup(), UnifiedRenameMap::lookup(), std::hash< RegId >::operator()(), SimpleRenameMap::rename(), and SimpleRenameMap::setEntry().
|
inline |
Definition at line 204 of file reg_class.hh.
References numPinnedWrites.
Referenced by SimpleRenameMap::rename(), and DefaultRename< Impl >::renameDestRegs().
|
inline |
Definition at line 174 of file reg_class.hh.
References regIdx.
|
inline |
Index accessors.
Definition at line 173 of file reg_class.hh.
References regIdx.
Referenced by Checker< O3CPUImpl >::copyResult(), TimingExprSrcReg::eval(), X86ISA::ISA::flattenRegId(), SparcISA::ISA::flattenRegId(), ArmISA::ISA::flattenRegId(), FullO3CPU< O3CPUImpl >::insertThread(), X86ISA::MemOp::MemOp(), operator<(), operator==(), BaseO3DynInst< Impl >::readMiscRegOperand(), Iris::ThreadContext::readVecPredReg(), Iris::ThreadContext::readVecReg(), DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::renameSrcRegs(), and CheckerCPU::setMiscRegOperand().
|
inline |
@Return true if it is a condition-code physical register.
Definition at line 158 of file reg_class.hh.
References CCRegClass, and regClass.
Referenced by PhysRegId::isCCPhysReg().
|
inline |
Definition at line 146 of file reg_class.hh.
References FloatRegClass, and regClass.
Referenced by PhysRegId::isFloatPhysReg().
|
inline |
Definition at line 143 of file reg_class.hh.
References IntRegClass, and regClass.
Referenced by PhysRegId::isIntPhysReg().
|
inline |
@Return true if it is a condition-code physical register.
Definition at line 161 of file reg_class.hh.
References MiscRegClass, and regClass.
Referenced by PhysRegId::isMiscPhysReg(), and ElasticTrace::updateRegDep().
|
inline |
Return true if this register can be renamed.
Definition at line 166 of file reg_class.hh.
References MiscRegClass, and regClass.
|
inline |
Return true if this register can be renamed.
Definition at line 126 of file reg_class.hh.
References MiscRegClass, and regClass.
Referenced by PhysRegId::isFixedMapping().
|
inline |
@Return true if it is a condition-code physical register.
Definition at line 152 of file reg_class.hh.
References regClass, and VecElemClass.
Referenced by PhysRegId::isVectorPhysElem().
|
inline |
@Return true if it is a predicate physical register.
Definition at line 155 of file reg_class.hh.
References regClass, and VecPredRegClass.
Referenced by PhysRegId::isVecPredPhysReg().
|
inline |
@Return true if it is a condition-code physical register.
Definition at line 149 of file reg_class.hh.
References regClass, and VecRegClass.
Referenced by PhysRegId::isVectorPhysReg().
|
inline |
Check if this is the zero register.
Returns true if this register is a zero register (needs to have a constant zero value throughout the execution).
Definition at line 137 of file reg_class.hh.
References IntRegClass, regClass, regIdx, and ArmISA::ZeroReg.
Referenced by ElasticTrace::updateRegDep().
|
inline |
Definition at line 109 of file reg_class.hh.
Referenced by PhysRegId::operator!=().
|
inline |
Order operator.
The order is required to implement maps with key type RegId
Definition at line 116 of file reg_class.hh.
References classValue(), elemIdx, elemIndex(), index(), regClass, and regIdx.
Referenced by PhysRegId::operator<().
|
inline |
Definition at line 104 of file reg_class.hh.
References classValue(), elemIdx, elemIndex(), index(), regClass, and regIdx.
Referenced by PhysRegId::operator==().
|
inline |
Definition at line 205 of file reg_class.hh.
References numPinnedWrites.
Referenced by DefaultRename< Impl >::renameDestRegs().
|
friend |
Definition at line 208 of file reg_class.hh.
|
friend |
Definition at line 84 of file reg_class.hh.
|
protected |
Definition at line 80 of file reg_class.hh.
Referenced by elemIndex(), flatIndex(), operator<(), operator==(), and RegId().
|
protected |
Definition at line 82 of file reg_class.hh.
Referenced by PhysRegId::decrNumPinnedWrites(), getNumPinnedWrites(), PhysRegId::getNumPinnedWrites(), PhysRegId::incrNumPinnedWrites(), setNumPinnedWrites(), and PhysRegId::setNumPinnedWrites().
|
protected |
Definition at line 78 of file reg_class.hh.
Referenced by className(), classValue(), flatIndex(), isCCReg(), isFloatReg(), isIntReg(), isMiscReg(), isRenameable(), isVecElem(), isVecPredReg(), isVecReg(), isZeroReg(), std::hash< RegId >::operator()(), operator<(), operator==(), and RegId().
|
staticprotected |
Definition at line 77 of file reg_class.hh.
Referenced by className().
|
protected |
Definition at line 79 of file reg_class.hh.
Referenced by flatIndex(), index(), isZeroReg(), operator<(), and operator==().
|
staticconstexprprotected |
Definition at line 81 of file reg_class.hh.
Referenced by flatIndex().