summaryrefslogtreecommitdiff
path: root/src/arch/sparc/isa.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-10-10 20:38:05 -0700
committerGabe Black <gblack@eecs.umich.edu>2010-10-10 20:38:05 -0700
commit157d6f9c2fb203dd95fe53c3481e851ea55272ef (patch)
tree8768e64c9c290a4b159b3bebe4d7dbbce20529c3 /src/arch/sparc/isa.cc
parent63fa65613eb654e819721930782a13f1177f31c2 (diff)
downloadgem5-157d6f9c2fb203dd95fe53c3481e851ea55272ef.tar.xz
SPARC: Make SPARC's ISA's clear function initialize everything it should.
Also make it not set some pointers to NULL potentially introducing a memory leak. That should be done in the constructor.
Diffstat (limited to 'src/arch/sparc/isa.cc')
-rw-r--r--src/arch/sparc/isa.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/arch/sparc/isa.cc b/src/arch/sparc/isa.cc
index 3226b4e42..9d4490fa3 100644
--- a/src/arch/sparc/isa.cc
+++ b/src/arch/sparc/isa.cc
@@ -99,6 +99,7 @@ ISA::clear()
memset(tnpc, 0, sizeof(tnpc));
memset(tstate, 0, sizeof(tstate));
memset(tt, 0, sizeof(tt));
+ tba = 0;
pstate = 0;
tl = 0;
pil = 0;
@@ -123,10 +124,21 @@ ISA::clear()
lsuCtrlReg = 0;
memset(scratchPad, 0, sizeof(scratchPad));
+
+ cpu_mondo_head = 0;
+ cpu_mondo_tail = 0;
+ dev_mondo_head = 0;
+ dev_mondo_tail = 0;
+ res_error_head = 0;
+ res_error_tail = 0;
+ nres_error_head = 0;
+ nres_error_tail = 0;
+
#if FULL_SYSTEM
- tickCompare = NULL;
- sTickCompare = NULL;
- hSTickCompare = NULL;
+ // If one of these events is active, it's not obvious to me how to get
+ // rid of it cleanly. For now we'll just assert that they're not.
+ if (tickCompare != NULL && sTickCompare != NULL && hSTickCompare != NULL)
+ panic("Tick comparison event active when clearing the ISA object.\n");
#endif
}