summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-10-09 00:15:50 -0700
committerGabe Black <gblack@eecs.umich.edu>2011-10-09 00:15:50 -0700
commitf338d60930e973d330d13715b8617c22b980dcca (patch)
treed0980316aa40ff6f15699b752a2087035a634c65 /src/cpu/base.cc
parent020e923ba7f027b7b3b18ccf8ac208c576d75b95 (diff)
downloadgem5-f338d60930e973d330d13715b8617c22b980dcca.tar.xz
SE/FS: Build the Interrupt objects in SE mode.
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 1e25a5982..d5343aa64 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -100,18 +100,11 @@ CPUProgressEvent::description() const
return "CPU Progress";
}
-#if FULL_SYSTEM
BaseCPU::BaseCPU(Params *p)
: MemObject(p), clock(p->clock), instCnt(0), _cpuId(p->cpu_id),
interrupts(p->interrupts),
numThreads(p->numThreads), system(p->system),
phase(p->phase)
-#else
-BaseCPU::BaseCPU(Params *p)
- : MemObject(p), clock(p->clock), _cpuId(p->cpu_id),
- numThreads(p->numThreads), system(p->system),
- phase(p->phase)
-#endif
{
// currentTick = curTick();
@@ -202,9 +195,9 @@ BaseCPU::BaseCPU(Params *p)
schedule(event, p->function_trace_start);
}
}
-#if FULL_SYSTEM
interrupts->setCPU(this);
+#if FULL_SYSTEM
profileEvent = NULL;
if (params()->profile)
profileEvent = new ProfileEvent(this, params()->profile);
@@ -395,10 +388,10 @@ BaseCPU::takeOverFrom(BaseCPU *oldCPU, Port *ic, Port *dc)
}
}
-#if FULL_SYSTEM
interrupts = oldCPU->interrupts;
interrupts->setCPU(this);
+#if FULL_SYSTEM
for (ThreadID i = 0; i < size; ++i)
threadContexts[i]->profileClear();
@@ -440,6 +433,8 @@ BaseCPU::ProfileEvent::process()
cpu->schedule(this, curTick() + interval);
}
+#endif // FULL_SYSTEM
+
void
BaseCPU::serialize(std::ostream &os)
{
@@ -454,8 +449,6 @@ BaseCPU::unserialize(Checkpoint *cp, const std::string &section)
interrupts->unserialize(cp, section);
}
-#endif // FULL_SYSTEM
-
void
BaseCPU::traceFunctionsInternal(Addr pc)
{