CPU: Make the cpus check the pc event queues in SE mode.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 3 Oct 2007 01:25:37 +0000 (18:25 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 3 Oct 2007 01:25:37 +0000 (18:25 -0700)
--HG--
extra : convert_revision : 9dc4ea136c3c3f87a73d55e91bc4aae4eba70464

src/cpu/o3/commit_impl.hh
src/cpu/simple/base.cc

index e32dc79215f1fbc35c24a29ad5db095573c7fc1a..89df257e98b548e22cc092cb0e43f062ffedbe47 100644 (file)
@@ -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",
index 9fc1d1dd9320288761b7b28a0c0573b76267f17c..812a15c87cb8d7a2d905a61a844de0686294256b 100644 (file)
@@ -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
 }