Go to the documentation of this file.
41 #ifndef __CPU__REG_CLASS_HH__
42 #define __CPU__REG_CLASS_HH__
78 virtual std::string
valString(
const void *
val,
size_t size)
const;
97 size_t reg_bytes=
sizeof(
RegVal)) :
103 RegClass(num_regs, debug_flag, reg_bytes)
157 return !(*
this==that);
193 constexpr
const char*
209 template <
typename ValueType>
216 assert(size ==
sizeof(ValueType));
221 template <
typename ValueType>
237 return csprintf(
"v%d[%d]", reg_idx, elem_idx);
315 pinned = (numWrites != 0);
353 const size_t index =
static_cast<size_t>(reg_id.
index());
354 const size_t class_num =
static_cast<size_t>(reg_id.
regClass);
356 const size_t shifted_class_num =
361 const size_t concatenated_hash =
index | shifted_class_num;
367 "sizeof(RegIndex) should be less than sizeof(size_t)");
369 return concatenated_hash;
374 #endif // __CPU__REG_CLASS_HH__
constexpr bool operator!=(const RegId &that) const
constexpr bool isRenameable() const
Return true if this register can be renamed.
int getNumPinnedWrites() const
size_t operator()(const gem5::RegId ®_id) const
@ VecElemClass
Vector Register Native Elem lane.
@ CCRegClass
Condition-code register.
int getNumPinnedWrites() const
friend std::ostream & operator<<(std::ostream &os, const RegId &rid)
std::string valString(const void *val) const
constexpr size_t regBytes() const
virtual std::string valString(const void *val, size_t size) const
Print the value of a register pointed to by val of size size.
const debug::Flag & debugFlag
std::string csprintf(const char *format, const Args &...args)
virtual std::string regName(const RegId &id) const
Print the name of the register specified in id.
constexpr const char * className() const
Return a const char* with the register class name.
void decrNumPinnedWritesToComplete()
std::string regName(const RegId &id) const
std::string valString(const void *val, size_t size) const override
Print the value of a register pointed to by val of size size.
@ FloatRegClass
Floating-point register.
VecElemRegClassOps(size_t elems_per_vec)
void decrNumPinnedWrites()
void setNumPinnedWrites(int num_writes)
const RegIndex & flatIndex() const
Flat index accessor.
void incrNumPinnedWritesToComplete()
constexpr bool operator==(const RegId &that) const
bool operator!=(const PhysRegId &that) const
static const char * regClassStrings[]
constexpr bool operator<(const RegId &that) const
Order operator.
constexpr RegId(RegClassType reg_class, RegIndex reg_idx)
int getNumPinnedWritesToComplete() const
int numPinnedWritesToComplete
constexpr RegClass(size_t num_regs, RegClassOps &new_ops, const debug::Flag &debug_flag, size_t reg_bytes=sizeof(RegVal))
bool operator<(const PhysRegId &that) const
Explicit forward methods, to prevent comparisons of PhysRegId with RegIds.
@ IntRegClass
Integer register.
constexpr RegClass(size_t num_regs, const debug::Flag &debug_flag, size_t reg_bytes=sizeof(RegVal))
constexpr size_t regShift() const
std::string regName(const RegId &id) const override
Print the name of the register specified in id.
static constexpr int ceilLog2(const T &n)
RegClassType
Enumerate the classes of registers.
static RegClassOps defaultOps
@ MiscRegClass
Control (misc) register.
Overload hash function for BasicBlockRange type.
void incrNumPinnedWrites()
void setNumPinnedWrites(int numWrites)
void setNumPinnedWritesToComplete(int numWrites)
PhysRegId(RegClassType _regClass, RegIndex _regIdx, RegIndex _flatIdx)
Scalar PhysRegId constructor.
bool isFixedMapping() const
Returns true if this register is always associated to the same architectural register.
@ VecRegClass
Vector Register.
constexpr RegIndex index() const
Index accessors.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
constexpr RegClassType classValue() const
Class accessor.
constexpr bool is(RegClassType reg_class) const
constexpr const debug::Flag & debug() const
bool operator==(const PhysRegId &that) const
Register ID: describe an architectural register with its class and index.
constexpr size_t numRegs() const
Generated on Thu Jun 16 2022 10:41:48 for gem5 by doxygen 1.8.17