CPU: Make the cpus check the pc event queues in SE mode.

--HG--
extra : convert_revision : 9dc4ea136c3c3f87a73d55e91bc4aae4eba70464
This commit is contained in:
Gabe Black 2007-10-02 18:25:37 -07:00
parent 48041fdc53
commit 988cdb49f2
2 changed files with 6 additions and 12 deletions

View file

@ -910,25 +910,21 @@ DefaultCommit<Impl>::commitInsts()
microPC[tid] = nextMicroPC[tid]; microPC[tid] = nextMicroPC[tid];
nextMicroPC[tid] = microPC[tid] + 1; nextMicroPC[tid] = microPC[tid] + 1;
#if FULL_SYSTEM
int count = 0; int count = 0;
Addr oldpc; 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 { 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]; oldpc = PC[tid];
cpu->system->pcEventQueue.service( cpu->system->pcEventQueue.service(thread[tid]->getTC());
thread[tid]->getTC());
count++; count++;
} while (oldpc != PC[tid]); } while (oldpc != PC[tid]);
if (count > 1) { if (count > 1) {
DPRINTF(Commit, "PC skip function event, stopping commit\n"); DPRINTF(Commit,
"PC skip function event, stopping commit\n");
break; break;
} }
#endif
} else { } else {
DPRINTF(Commit, "Unable to commit head instruction PC:%#x " DPRINTF(Commit, "Unable to commit head instruction PC:%#x "
"[tid:%i] [sn:%i].\n", "[tid:%i] [sn:%i].\n",

View file

@ -493,12 +493,10 @@ BaseSimpleCPU::advancePC(Fault fault)
} }
} }
#if FULL_SYSTEM
Addr oldpc; Addr oldpc;
do { do {
oldpc = thread->readPC(); oldpc = thread->readPC();
system->pcEventQueue.service(tc); system->pcEventQueue.service(tc);
} while (oldpc != thread->readPC()); } while (oldpc != thread->readPC());
#endif
} }