summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-10-02 18:25:37 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-10-02 18:25:37 -0700
commit988cdb49f28c904b4b50c64759305bb371b81776 (patch)
tree2b4f70ee209fb8ba62a2408a884194577dc467f1 /src/cpu
parent48041fdc531a535a45c86d61675ec7f654629fb3 (diff)
downloadgem5-988cdb49f28c904b4b50c64759305bb371b81776.tar.xz
CPU: Make the cpus check the pc event queues in SE mode.
--HG-- extra : convert_revision : 9dc4ea136c3c3f87a73d55e91bc4aae4eba70464
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/o3/commit_impl.hh16
-rw-r--r--src/cpu/simple/base.cc2
2 files changed, 6 insertions, 12 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index e32dc7921..89df257e9 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -910,25 +910,21 @@ DefaultCommit<Impl>::commitInsts()
microPC[tid] = nextMicroPC[tid];
nextMicroPC[tid] = microPC[tid] + 1;
-#if FULL_SYSTEM
int count = 0;
Addr oldpc;
+ // Debug statement. Checks to make sure we're not
+ // currently updating state while handling PC events.
+ assert(!thread[tid]->inSyscall && !thread[tid]->trapPending);
do {
- // Debug statement. Checks to make sure we're not
- // currently updating state while handling PC events.
- if (count == 0)
- assert(!thread[tid]->inSyscall &&
- !thread[tid]->trapPending);
oldpc = PC[tid];
- cpu->system->pcEventQueue.service(
- thread[tid]->getTC());
+ cpu->system->pcEventQueue.service(thread[tid]->getTC());
count++;
} while (oldpc != PC[tid]);
if (count > 1) {
- DPRINTF(Commit, "PC skip function event, stopping commit\n");
+ DPRINTF(Commit,
+ "PC skip function event, stopping commit\n");
break;
}
-#endif
} else {
DPRINTF(Commit, "Unable to commit head instruction PC:%#x "
"[tid:%i] [sn:%i].\n",
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 9fc1d1dd9..812a15c87 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -493,12 +493,10 @@ BaseSimpleCPU::advancePC(Fault fault)
}
}
-#if FULL_SYSTEM
Addr oldpc;
do {
oldpc = thread->readPC();
system->pcEventQueue.service(tc);
} while (oldpc != thread->readPC());
-#endif
}