changeset ee898bed2872 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ee898bed2872
description:
        inorder: make marking of dest. regs an explicit request
        formerly, this was implicit when you accessed the execution unit
        or the use-def unit but it's better that this just be something
        that a user can specify.

diffstat:

 src/cpu/inorder/cpu.cc                      |   1 +
 src/cpu/inorder/resources/execution_unit.cc |  12 ------------
 src/cpu/inorder/resources/use_def.cc        |  13 +++++++------
 src/cpu/inorder/resources/use_def.hh        |   3 ++-
 4 files changed, 10 insertions(+), 19 deletions(-)

diffs (76 lines):

diff -r 19a930f946ce -r ee898bed2872 src/cpu/inorder/cpu.cc
--- a/src/cpu/inorder/cpu.cc    Sun Jun 19 21:43:35 2011 -0400
+++ b/src/cpu/inorder/cpu.cc    Sun Jun 19 21:43:35 2011 -0400
@@ -419,6 +419,7 @@
     }
 
     // EXECUTE
+    X.needs(RegManager, UseDefUnit::MarkDestRegs);
     for (int idx=0; idx < inst->numSrcRegs(); idx++) {
         if (!idx || !inst->isStore()) {
             X.needs(RegManager, UseDefUnit::ReadSrcReg, idx);
diff -r 19a930f946ce -r ee898bed2872 src/cpu/inorder/resources/execution_unit.cc
--- a/src/cpu/inorder/resources/execution_unit.cc       Sun Jun 19 21:43:35 
2011 -0400
+++ b/src/cpu/inorder/resources/execution_unit.cc       Sun Jun 19 21:43:35 
2011 -0400
@@ -99,18 +99,6 @@
         return;
     }
 
-
-    //@todo: may want to make a separate schedule entry for setting
-    //       destination register dependencies
-    //@note: typically want to set the output dependencies right
-    //       before we do any reading or writing of registers
-    //       (in RegFile Manager(use_def.cc)) but there are some
-    //       instructions that dont have src regs, so just in case
-    //       take care of reg. dep. map stuff here
-    if (!inst->isRegDepEntry()) {
-        regDepMap[tid]->insert(inst);
-    }
-
     switch (exec_req->cmd)
     {
       case ExecuteInst:
diff -r 19a930f946ce -r ee898bed2872 src/cpu/inorder/resources/use_def.cc
--- a/src/cpu/inorder/resources/use_def.cc      Sun Jun 19 21:43:35 2011 -0400
+++ b/src/cpu/inorder/resources/use_def.cc      Sun Jun 19 21:43:35 2011 -0400
@@ -172,12 +172,6 @@
         *nonSpecSeqNum[tid] = seq_num;
     }
 
-    //@todo: may want to make a separate schedule entry for setting
-    //       destination register dependencies
-    if (!inst->isRegDepEntry()) {
-        regDepMap[tid]->insert(inst);
-    }
-
     switch (ud_req->cmd)
     {
       case ReadSrcReg:
@@ -446,6 +440,13 @@
         }
         break;
 
+      case MarkDestRegs:
+        {
+            regDepMap[tid]->insert(inst);
+            ud_req->done();
+        }
+        break;
+
       default:
         fatal("Unrecognized command to %s", resName);
     }
diff -r 19a930f946ce -r ee898bed2872 src/cpu/inorder/resources/use_def.hh
--- a/src/cpu/inorder/resources/use_def.hh      Sun Jun 19 21:43:35 2011 -0400
+++ b/src/cpu/inorder/resources/use_def.hh      Sun Jun 19 21:43:35 2011 -0400
@@ -50,7 +50,8 @@
 
     enum Command {
         ReadSrcReg,
-        WriteDestReg
+        WriteDestReg,
+        MarkDestRegs
     };
 
   public:
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to