inorder: ignore nops in execution unit
authorKorey Sewell <ksewell@umich.edu>
Fri, 18 Feb 2011 19:30:38 +0000 (14:30 -0500)
committerKorey Sewell <ksewell@umich.edu>
Fri, 18 Feb 2011 19:30:38 +0000 (14:30 -0500)
src/cpu/inorder/resources/execution_unit.cc

index e4d0c20b915a38066d87e5a8f192473a8c75ab1c..b2540cff8b18962fa8fc91fa4775ce200deef581 100644 (file)
@@ -101,8 +101,17 @@ ExecutionUnit::execute(int slot_num)
     {
       case ExecuteInst:
         {
-            DPRINTF(InOrderExecute, "[tid:%i] Executing [sn:%i] [PC:%s] %s.\n",
-                    inst->readTid(), seq_num, inst->pcState(), inst->instName());
+            if (inst->isNop()) {
+                DPRINTF(InOrderExecute, "[tid:%i] [sn:%i] [PC:%s] Ignoring execution"
+                        "of %s.\n", inst->readTid(), seq_num, inst->pcState(),
+                        inst->instName());
+                inst->setExecuted();
+                exec_req->done();
+                return;
+            } else {
+                DPRINTF(InOrderExecute, "[tid:%i] Executing [sn:%i] [PC:%s] %s.\n",
+                        inst->readTid(), seq_num, inst->pcState(), inst->instName());
+            }
 
             if (cur_tick != lastExecuteTick) {
                 lastExecuteTick = cur_tick;