summaryrefslogtreecommitdiff
path: root/src/cpu/checker/cpu.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-06-08 16:58:50 -0400
committerKevin Lim <ktlim@umich.edu>2006-06-08 16:58:50 -0400
commitcf79dba504e2ed47ea82dae6cfc71662d1bc25a0 (patch)
tree2e273cc1ae8045bcaa920cb75d73dc552820a0f9 /src/cpu/checker/cpu.cc
parentbf6e176554253bed701338a8f481634e1cea8b48 (diff)
downloadgem5-cf79dba504e2ed47ea82dae6cfc71662d1bc25a0.tar.xz
Get O3 CPU mostly working in full system, and fix an FP bug that showed up.
It still does not yet handle retries. src/cpu/base_dyn_inst.hh: Get working in full-system mode and fix some FP bugs. src/cpu/checker/cpu.cc: src/cpu/checker/cpu.hh: src/cpu/checker/thread_context.hh: src/cpu/o3/alpha_cpu.hh: src/cpu/o3/alpha_cpu_impl.hh: src/cpu/o3/commit_impl.hh: src/cpu/o3/cpu.cc: src/cpu/o3/cpu.hh: src/cpu/o3/fetch_impl.hh: src/cpu/o3/thread_state.hh: src/cpu/ozone/cpu.hh: src/cpu/ozone/thread_state.hh: src/cpu/thread_state.hh: Get working in full system. src/cpu/checker/o3_cpu_builder.cc: Checker does not take a MemObject as a simobj parameter. src/cpu/o3/alpha_dyn_inst.hh: Fix up float regs. src/cpu/o3/regfile.hh: Fix up an fp error, print out more useful output messages. --HG-- extra : convert_revision : d7cc152a051c697f18b7ee9e14050fbf3ffa5966
Diffstat (limited to 'src/cpu/checker/cpu.cc')
-rw-r--r--src/cpu/checker/cpu.cc37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/cpu/checker/cpu.cc b/src/cpu/checker/cpu.cc
index b328a66c4..ebc02f7be 100644
--- a/src/cpu/checker/cpu.cc
+++ b/src/cpu/checker/cpu.cc
@@ -81,7 +81,6 @@ CheckerCPU::CheckerCPU(Params *p)
itb = p->itb;
dtb = p->dtb;
systemPtr = NULL;
- memPtr = NULL;
#else
process = p->process;
#endif
@@ -94,44 +93,32 @@ CheckerCPU::~CheckerCPU()
void
CheckerCPU::setMemory(MemObject *mem)
{
- memPtr = mem;
#if !FULL_SYSTEM
+ memPtr = mem;
thread = new SimpleThread(this, /* thread_num */ 0, process,
/* asid */ 0, mem);
thread->setStatus(ThreadContext::Suspended);
tc = thread->getTC();
threadContexts.push_back(tc);
-#else
- if (systemPtr) {
- thread = new SimpleThread(this, 0, systemPtr, itb, dtb, memPtr, false);
-
- thread->setStatus(ThreadContext::Suspended);
- tc = thread->getTC();
- threadContexts.push_back(tc);
- delete thread->kernelStats;
- thread->kernelStats = NULL;
- }
#endif
}
-#if FULL_SYSTEM
void
CheckerCPU::setSystem(System *system)
{
+#if FULL_SYSTEM
systemPtr = system;
- if (memPtr) {
- thread = new SimpleThread(this, 0, systemPtr, itb, dtb, memPtr, false);
+ thread = new SimpleThread(this, 0, systemPtr, itb, dtb, false);
- thread->setStatus(ThreadContext::Suspended);
- tc = thread->getTC();
- threadContexts.push_back(tc);
- delete thread->kernelStats;
- thread->kernelStats = NULL;
- }
-}
+ thread->setStatus(ThreadContext::Suspended);
+ tc = thread->getTC();
+ threadContexts.push_back(tc);
+ delete thread->kernelStats;
+ thread->kernelStats = NULL;
#endif
+}
void
CheckerCPU::setIcachePort(Port *icache_port)
@@ -350,7 +337,7 @@ CheckerCPU::write(int32_t data, Addr addr, unsigned flags, uint64_t *res)
Addr
CheckerCPU::dbg_vtophys(Addr addr)
{
- return vtophys(xcProxy, addr);
+ return vtophys(tc, addr);
}
#endif // FULL_SYSTEM
@@ -601,7 +588,7 @@ Checker<DynInstPtr>::tick(DynInstPtr &completed_inst)
if (fault != NoFault) {
#if FULL_SYSTEM
- fault->invoke(xcProxy);
+ fault->invoke(tc);
willChangePC = true;
newPC = thread->readPC();
DPRINTF(Checker, "Fault, PC is now %#x\n", newPC);
@@ -630,7 +617,7 @@ Checker<DynInstPtr>::tick(DynInstPtr &completed_inst)
int count = 0;
do {
oldpc = thread->readPC();
- system->pcEventQueue.service(xcProxy);
+ system->pcEventQueue.service(tc);
count++;
} while (oldpc != thread->readPC());
if (count > 1) {