Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/45229 )
Change subject: arch,cpu: Rename RegClass to RegClassIndex.
......................................................................
arch,cpu: Rename RegClass to RegClassIndex.
This type is really an index which selects a RegClass, not a RegClass
itself.
A follow on change will rename RegClassInfo to RegClass.
Change-Id: I2c1b1d4105bd11b58680053b484d4c1aa1055a9f
---
M src/arch/arm/tracers/tarmac_record.hh
M src/arch/x86/insts/static_inst.hh
M src/cpu/o3/regfile.cc
M src/cpu/o3/regfile.hh
M src/cpu/reg_class.hh
5 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/arch/arm/tracers/tarmac_record.hh
b/src/arch/arm/tracers/tarmac_record.hh
index b02f780..f47b703 100644
--- a/src/arch/arm/tracers/tarmac_record.hh
+++ b/src/arch/arm/tracers/tarmac_record.hh
@@ -160,7 +160,7 @@
/** True if register entry is valid */
bool regValid;
/** Register class */
- RegClass regClass;
+ RegClassIndex regClass;
/** Register arch number */
RegIndex regRel;
/** Register name to be printed */
diff --git a/src/arch/x86/insts/static_inst.hh
b/src/arch/x86/insts/static_inst.hh
index 52f8048..57dba5f 100644
--- a/src/arch/x86/insts/static_inst.hh
+++ b/src/arch/x86/insts/static_inst.hh
@@ -60,7 +60,7 @@
// unified space concept, it is easier for the moment to rely on
// an helper function to compute the RegClass. It would be nice
// to fix those definition and get rid of this.
- RegClass
+ RegClassIndex
computeRegClass(RegIndex _idx)
{
if (_idx < FP_Reg_Base) {
diff --git a/src/cpu/o3/regfile.cc b/src/cpu/o3/regfile.cc
index bdbea30..18dab11 100644
--- a/src/cpu/o3/regfile.cc
+++ b/src/cpu/o3/regfile.cc
@@ -191,7 +191,7 @@
}
PhysRegFile::IdRange
-PhysRegFile::getRegIds(RegClass cls)
+PhysRegFile::getRegIds(RegClassIndex cls)
{
switch (cls)
{
diff --git a/src/cpu/o3/regfile.hh b/src/cpu/o3/regfile.hh
index fca0959..880e849 100644
--- a/src/cpu/o3/regfile.hh
+++ b/src/cpu/o3/regfile.hh
@@ -351,7 +351,7 @@
* Auxiliary function to transition from Full vector mode to Elem mode
* and to initialise the rename map.
*/
- IdRange getRegIds(RegClass cls);
+ IdRange getRegIds(RegClassIndex cls);
/**
* Get the true physical register id.
diff --git a/src/cpu/reg_class.hh b/src/cpu/reg_class.hh
index 36c4206..0f303ec 100644
--- a/src/cpu/reg_class.hh
+++ b/src/cpu/reg_class.hh
@@ -49,7 +49,7 @@
#include "config/the_isa.hh"
/** Enumerate the classes of registers. */
-enum RegClass
+enum RegClassIndex
{
IntRegClass, ///< Integer register
FloatRegClass, ///< Floating-point register
@@ -86,7 +86,7 @@
{
protected:
static const char* regClassStrings[];
- RegClass regClass;
+ RegClassIndex regClass;
RegIndex regIdx;
ElemIndex elemIdx;
static constexpr size_t Scale = TheISA::NumVecElemPerVecReg;
@@ -97,10 +97,11 @@
public:
RegId() : RegId(IntRegClass, 0) {}
- RegId(RegClass reg_class, RegIndex reg_idx)
+ RegId(RegClassIndex reg_class, RegIndex reg_idx)
: RegId(reg_class, reg_idx, IllegalElemIndex) {}
- explicit RegId(RegClass reg_class, RegIndex reg_idx, ElemIndex
elem_idx)
+ explicit RegId(RegClassIndex reg_class, RegIndex reg_idx,
+ ElemIndex elem_idx)
: regClass(reg_class), regIdx(reg_idx), elemIdx(elem_idx),
numPinnedWrites(0)
{
@@ -144,7 +145,7 @@
}
/** @return true if it is of the specified class. */
- bool is(RegClass reg_class) const { return regClass == reg_class; }
+ bool is(RegClassIndex reg_class) const { return regClass == reg_class;
}
/** Index accessors */
/** @{ */
@@ -174,7 +175,7 @@
/** Elem accessor */
RegIndex elemIndex() const { return elemIdx; }
/** Class accessor */
- RegClass classValue() const { return regClass; }
+ RegClassIndex classValue() const { return regClass; }
/** Return a const char* with the register class name. */
const char* className() const { return regClassStrings[regClass]; }
@@ -205,14 +206,14 @@
{}
/** Scalar PhysRegId constructor. */
- explicit PhysRegId(RegClass _regClass, RegIndex _regIdx,
+ explicit PhysRegId(RegClassIndex _regClass, RegIndex _regIdx,
RegIndex _flatIdx)
: RegId(_regClass, _regIdx), flatIdx(_flatIdx),
numPinnedWritesToComplete(0), pinned(false)
{}
/** Vector PhysRegId constructor (w/ elemIndex). */
- explicit PhysRegId(RegClass _regClass, RegIndex _regIdx,
+ explicit PhysRegId(RegClassIndex _regClass, RegIndex _regIdx,
ElemIndex elem_idx, RegIndex flat_idx)
: RegId(_regClass, _regIdx, elem_idx), flatIdx(flat_idx),
numPinnedWritesToComplete(0), pinned(false)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45229
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2c1b1d4105bd11b58680053b484d4c1aa1055a9f
Gerrit-Change-Number: 45229
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s