summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-10 04:33:41 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-10 04:33:41 -0500
commit71dc49c785b8623b82bf0d7b9df6085a3cd66dfa (patch)
tree87cb4f5a2efeb2c93159f4e7e76cc76b817fc41a
parentdc6af9fbf7bbbe29e431190867a2fed6fdcce8b5 (diff)
downloadgem5-71dc49c785b8623b82bf0d7b9df6085a3cd66dfa.tar.xz
The reset function of the MiscRegFile really resets it now. This function is called from the class's constructor.
--HG-- extra : convert_revision : 4e7a40ffe0a9a71fd1b2b171d9c0dcac50e1a1fe
-rw-r--r--src/arch/sparc/miscregfile.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/arch/sparc/miscregfile.cc b/src/arch/sparc/miscregfile.cc
index 714c9bdab..d52e3983f 100644
--- a/src/arch/sparc/miscregfile.cc
+++ b/src/arch/sparc/miscregfile.cc
@@ -29,6 +29,7 @@
* Ali Saidi
*/
+#include "arch/sparc/asi.hh"
#include "arch/sparc/miscregfile.hh"
#include "base/bitfield.hh"
#include "base/trace.hh"
@@ -63,6 +64,39 @@ string SparcISA::getMiscRegName(RegIndex index)
void MiscRegFile::reset()
{
+ y = 0;
+ ccr = 0;
+ asi = 0;
+ tick = 0;
+ fprs = 0;
+ gsr = 0;
+ softint = 0;
+ tick_cmpr = 0;
+ stick = 0;
+ stick_cmpr = 0;
+ memset(tpc, 0, sizeof(tpc));
+ memset(tnpc, 0, sizeof(tnpc));
+ memset(tstate, 0, sizeof(tstate));
+ memset(tt, 0, sizeof(tt));
+ pstate = 0;
+ tl = 0;
+ pil = 0;
+ cwp = 0;
+ cansave = 0;
+ canrestore = 0;
+ cleanwin = 0;
+ otherwin = 0;
+ wstate = 0;
+ gl = 0;
+ hpstate = 0;
+ memset(htstate, 0, sizeof(htstate));
+ hintp = 0;
+ htba = 0;
+ hstick_cmpr = 0;
+ strandStatusReg = 0;
+ fsr = 0;
+ implicitInstAsi = ASI_PRIMARY;
+ implicitDataAsi = ASI_PRIMARY;
}
MiscReg MiscRegFile::readReg(int miscReg)