Go to the documentation of this file.
41 #ifndef __CPU__REG_CLASS_HH__
42 #define __CPU__REG_CLASS_HH__
47 #include "arch/vecregs.hh"
49 #include "config/the_isa.hh"
112 "Creating vector physical index w/o element index");
115 "Creating non-vector physical index w/ element index");
173 panic(
"Trying to flatten a register without class!");
220 :
RegId(_regClass, _regIdx, elem_idx),
flatIdx(flat_idx),
283 pinned = (numWrites != 0);
321 const size_t flat_index =
static_cast<size_t>(reg_id.
flatIndex());
322 const size_t class_num =
static_cast<size_t>(reg_id.
regClass);
324 const size_t shifted_class_num =
329 const size_t concatenated_hash = flat_index | shifted_class_num;
335 "sizeof(RegIndex) should be less than sizeof(size_t)");
337 return concatenated_hash;
342 #endif // __CPU__REG_CLASS_HH__
constexpr unsigned NumVecElemPerVecReg
@ VecElemClass
Vector Register Native Elem lane.
@ CCRegClass
Condition-code register.
static PhysRegId elemId(PhysRegId *vid, ElemIndex elem)
RegClass
Enumerate the classes of registers.
int getNumPinnedWrites() const
size_t operator()(const gem5::RegId ®_id) const
RegIndex flatIndex() const
Index flattening.
RegClassInfo(size_t new_size, RegIndex new_zero=-1)
int getNumPinnedWrites() const
@ FloatRegClass
Floating-point register.
friend std::ostream & operator<<(std::ostream &os, const RegId &rid)
@ MiscRegClass
Control (misc) register.
bool operator!=(const RegId &that) const
RegClass classValue() const
Class accessor.
PhysRegId(RegClass _regClass, RegIndex _regIdx, ElemIndex elem_idx, RegIndex flat_idx)
Vector PhysRegId constructor (w/ elemIndex).
RegIndex index() const
Index accessors.
void decrNumPinnedWritesToComplete()
bool is(RegClass reg_class) const
void decrNumPinnedWrites()
void setNumPinnedWrites(int num_writes)
const RegIndex & flatIndex() const
Flat index accessor.
bool operator==(const RegId &that) const
bool isRenameable() const
Return true if this register can be renamed.
void incrNumPinnedWritesToComplete()
bool operator!=(const PhysRegId &that) const
static const char * regClassStrings[]
PhysRegId(RegClass _regClass, RegIndex _regIdx, RegIndex _flatIdx)
Scalar PhysRegId constructor.
int getNumPinnedWritesToComplete() const
const char * className() const
Return a const char* with the register class name.
int numPinnedWritesToComplete
uint16_t ElemIndex
Logical vector register elem index type.
bool operator<(const RegId &that) const
Order operator.
RegId(RegClass reg_class, RegIndex reg_idx, ElemIndex elem_idx)
bool operator<(const PhysRegId &that) const
Explicit forward methods, to prevent comparisons of PhysRegId with RegIds.
RegIndex elemIndex() const
Elem accessor.
@ VecRegClass
Vector Register.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Overload hash function for BasicBlockRange type.
RegId(RegClass reg_class, RegIndex reg_idx)
void incrNumPinnedWrites()
void setNumPinnedWrites(int numWrites)
void setNumPinnedWritesToComplete(int numWrites)
bool isFixedMapping() const
Returns true if this register is always associated to the same architectural register.
bool is(RegClass reg_class) const
@ IntRegClass
Integer register.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
static constexpr size_t Scale
RegIndex index() const
Visible RegId methods.
static const ElemIndex IllegalElemIndex
ElemIndex value that indicates that the register is not a vector.
bool operator==(const PhysRegId &that) const
Register ID: describe an architectural register with its class and index.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Jul 28 2021 12:10:24 for gem5 by doxygen 1.8.17