changeset 60bc62968888 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=60bc62968888
description:
ISA: Get rid of the get*RegName functions.
diffstat:
20 files changed, 29 insertions(+), 132 deletions(-)
src/arch/alpha/floatregfile.hh | 6 ------
src/arch/alpha/intregfile.hh | 6 ------
src/arch/alpha/miscregfile.hh | 6 ------
src/arch/mips/regfile/float_regfile.hh | 5 -----
src/arch/mips/regfile/int_regfile.hh | 5 -----
src/arch/mips/regfile/misc_regfile.cc | 16 +++++-----------
src/arch/mips/regfile/misc_regfile.hh | 2 --
src/arch/sparc/floatregfile.cc | 14 --------------
src/arch/sparc/floatregfile.hh | 2 --
src/arch/sparc/intregfile.cc | 10 ----------
src/arch/sparc/intregfile.hh | 3 ---
src/arch/sparc/miscregfile.cc | 28 +++-------------------------
src/arch/sparc/miscregfile.hh | 3 ---
src/arch/sparc/ua2005.cc | 21 +++++++++++++++++++++
src/arch/x86/floatregfile.cc | 9 ---------
src/arch/x86/floatregfile.hh | 2 --
src/arch/x86/intregfile.cc | 11 -----------
src/arch/x86/intregfile.hh | 3 ---
src/arch/x86/miscregfile.cc | 6 ------
src/arch/x86/miscregfile.hh | 3 ---
diffs (truncated from 417 to 300 lines):
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/alpha/floatregfile.hh
--- a/src/arch/alpha/floatregfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/alpha/floatregfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -42,12 +42,6 @@
namespace AlphaISA {
-static inline std::string
-getFloatRegName(RegIndex)
-{
- return "";
-}
-
class FloatRegFile
{
public:
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/alpha/intregfile.hh
--- a/src/arch/alpha/intregfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/alpha/intregfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -41,12 +41,6 @@
namespace AlphaISA {
-static inline std::string
-getIntRegName(RegIndex)
-{
- return "";
-}
-
// redirected register map, really only used for the full system case.
extern const int reg_redir[NumIntRegs];
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/alpha/miscregfile.hh
--- a/src/arch/alpha/miscregfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/alpha/miscregfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -53,12 +53,6 @@
MISCREG_INTR
};
-static inline std::string
-getMiscRegName(RegIndex)
-{
- return "";
-}
-
class MiscRegFile
{
public:
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/mips/regfile/float_regfile.hh
--- a/src/arch/mips/regfile/float_regfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/mips/regfile/float_regfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -44,11 +44,6 @@
namespace MipsISA
{
- static inline std::string getFloatRegName(RegIndex)
- {
- return "";
- }
-
const uint32_t MIPS32_QNAN = 0x7fbfffff;
const uint64_t MIPS64_QNAN = ULL(0x7fbfffffffffffff);
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/mips/regfile/int_regfile.hh
--- a/src/arch/mips/regfile/int_regfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/mips/regfile/int_regfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -42,11 +42,6 @@
namespace MipsISA
{
- static inline std::string getIntRegName(RegIndex)
- {
- return "";
- }
-
enum MiscIntRegNums {
LO = NumIntArchRegs,
HI,
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/mips/regfile/misc_regfile.cc
--- a/src/arch/mips/regfile/misc_regfile.cc Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/mips/regfile/misc_regfile.cc Wed Feb 25 10:22:31 2009 -0800
@@ -437,12 +437,6 @@
}
-inline std::string
-MipsISA::getMiscRegName(unsigned reg_idx)
-{
- return MiscRegFile::miscRegNames[reg_idx];
-}
-
inline unsigned
MiscRegFile::getVPENum(unsigned tid)
{
@@ -457,7 +451,7 @@
unsigned reg_sel = (bankType[misc_reg] == perThreadContext)
? tid : getVPENum(tid);
DPRINTF(MipsPRA, "Reading CP0 Register:%u Select:%u (%s) (%lx).\n",
- misc_reg / 8, misc_reg % 8, getMiscRegName(misc_reg),
+ misc_reg / 8, misc_reg % 8, miscRegNames[misc_reg],
miscRegFile[misc_reg][reg_sel]);
return miscRegFile[misc_reg][reg_sel];
}
@@ -474,7 +468,7 @@
? tid : getVPENum(tid);
DPRINTF(MipsPRA,
"Reading CP0 Register:%u Select:%u (%s) with effect (%lx).\n",
- misc_reg / 8, misc_reg % 8, getMiscRegName(misc_reg),
+ misc_reg / 8, misc_reg % 8, miscRegNames[misc_reg],
miscRegFile[misc_reg][reg_sel]);
@@ -494,7 +488,7 @@
DPRINTF(MipsPRA,
"[tid:%i]: Setting (direct set) CP0 Register:%u "
"Select:%u (%s) to %#x.\n",
- tid, misc_reg / 8, misc_reg % 8, getMiscRegName(misc_reg), val);
+ tid, misc_reg / 8, misc_reg % 8, miscRegNames[misc_reg], val);
miscRegFile[misc_reg][reg_sel] = val;
}
@@ -507,7 +501,7 @@
? tid : getVPENum(tid);
DPRINTF(MipsPRA,
"[tid:%i]: Setting CP0 Register: %u Select: %u (%s) to %#x\n",
- tid, misc_reg / 8, misc_reg % 8, getMiscRegName(misc_reg), val);
+ tid, misc_reg / 8, misc_reg % 8, miscRegNames[misc_reg], val);
miscRegFile_WriteMask[misc_reg][reg_sel] = val;
}
@@ -527,7 +521,7 @@
DPRINTF(MipsPRA,
"[tid:%i]: Setting CP0 Register:%u "
"Select:%u (%s) to %#x, with effect.\n",
- tid, misc_reg / 8, misc_reg % 8, getMiscRegName(misc_reg), val);
+ tid, misc_reg / 8, misc_reg % 8, miscRegNames[misc_reg], val);
MiscReg cp0_val = filterCP0Write(misc_reg, reg_sel, val);
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/mips/regfile/misc_regfile.hh
--- a/src/arch/mips/regfile/misc_regfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/mips/regfile/misc_regfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -162,8 +162,6 @@
static std::string miscRegNames[NumMiscRegs];
};
-
- inline std::string getMiscRegName(unsigned reg_idx);
} // namespace MipsISA
#endif
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/floatregfile.cc
--- a/src/arch/sparc/floatregfile.cc Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/floatregfile.cc Wed Feb 25 10:22:31 2009 -0800
@@ -41,20 +41,6 @@
class Checkpoint;
-string SparcISA::getFloatRegName(RegIndex index)
-{
- static std::string floatRegName[NumFloatRegs] =
- {"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
- "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
- "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
- "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
- "f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",
- "f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47",
- "f48", "f49", "f50", "f51", "f52", "f53", "f54", "f55",
- "f56", "f57", "f58", "f59", "f60", "f61", "f62", "f63"};
- return floatRegName[index];
-}
-
void FloatRegFile::clear()
{
memset(regSpace, 0, sizeof(regSpace));
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/floatregfile.hh
--- a/src/arch/sparc/floatregfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/floatregfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -42,8 +42,6 @@
namespace SparcISA
{
- std::string getFloatRegName(RegIndex);
-
const int NumFloatArchRegs = 64;
const int NumFloatRegs = 64;
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/intregfile.cc
--- a/src/arch/sparc/intregfile.cc Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/intregfile.cc Wed Feb 25 10:22:31 2009 -0800
@@ -41,16 +41,6 @@
class Checkpoint;
-string SparcISA::getIntRegName(RegIndex index)
-{
- static std::string intRegName[NumIntArchRegs] =
- {"g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
- "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7",
- "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
- "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7"};
- return intRegName[index];
-}
-
void IntRegFile::clear()
{
memset(regs, 0, sizeof(IntReg) * NumIntRegs);
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/intregfile.hh
--- a/src/arch/sparc/intregfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/intregfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -42,9 +42,6 @@
namespace SparcISA
{
- //This function translates integer register file indices into names
- std::string getIntRegName(RegIndex);
-
const int NumIntArchRegs = 32;
const int NumIntRegs = (MaxGL + 1) * 8 + NWindows * 16 + NumMicroIntRegs;
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/miscregfile.cc
--- a/src/arch/sparc/miscregfile.cc Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/miscregfile.cc Wed Feb 25 10:22:31 2009 -0800
@@ -42,27 +42,6 @@
class Checkpoint;
-//These functions map register indices to names
-string SparcISA::getMiscRegName(RegIndex index)
-{
- static::string miscRegName[NumMiscRegs] =
- {/*"y", "ccr",*/ "asi", "tick", "fprs", "pcr", "pic",
- "gsr", "softint_set", "softint_clr", "softint", "tick_cmpr",
- "stick", "stick_cmpr",
- "tpc", "tnpc", "tstate", "tt", "privtick", "tba", "pstate", "tl",
- "pil", "cwp", /*"cansave", "canrestore", "cleanwin", "otherwin",
- "wstate",*/ "gl",
- "hpstate", "htstate", "hintp", "htba", "hver", "strand_sts_reg",
- "hstick_cmpr",
- "fsr", "prictx", "secctx", "partId", "lsuCtrlReg",
- "scratch0", "scratch1", "scratch2", "scratch3", "scratch4",
- "scratch5", "scratch6", "scratch7", "cpuMondoHead", "cpuMondoTail",
- "devMondoHead", "devMondoTail", "resErrorHead", "resErrorTail",
- "nresErrorHead", "nresErrorTail", "TlbData" };
-
- return miscRegName[index];
-}
-
enum RegMask
{
PSTATE_MASK = (((1 << 4) - 1) << 1) | (((1 << 4) - 1) << 6) | (1 << 12)
@@ -328,8 +307,7 @@
//isn't, instead of panicing.
return 0;
- panic("Accessing Fullsystem register %s in SE mode\n",
- getMiscRegName(miscReg));
+ panic("Accessing Fullsystem register %d in SE mode\n", miscReg);
#endif
}
@@ -583,8 +561,8 @@
//HPSTATE is special because normal trap processing saves HPSTATE when
//it goes into a trap, and restores it when it returns.
return;
- panic("Accessing Fullsystem register %s to %#x in SE mode\n",
- getMiscRegName(miscReg), val);
+ panic("Accessing Fullsystem register %d to %#x in SE mode\n",
+ miscReg, val);
#endif
}
setRegNoEffect(miscReg, new_val);
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/miscregfile.hh
--- a/src/arch/sparc/miscregfile.hh Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/miscregfile.hh Wed Feb 25 10:22:31 2009 -0800
@@ -43,9 +43,6 @@
namespace SparcISA
{
- //These functions map register indices to names
- std::string getMiscRegName(RegIndex);
-
enum MiscRegIndex
{
/** Ancillary State Registers */
diff -r 34e658a2c4c0 -r 60bc62968888 src/arch/sparc/ua2005.cc
--- a/src/arch/sparc/ua2005.cc Wed Feb 25 10:22:25 2009 -0800
+++ b/src/arch/sparc/ua2005.cc Wed Feb 25 10:22:31 2009 -0800
@@ -35,6 +35,7 @@
#include "sim/system.hh"
using namespace SparcISA;
+using namespace std;
void
@@ -61,6 +62,26 @@
}
}
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev