Make it so the quiesce instruction is conditionally enabled
authorNathan Binkert <binkertn@umich.edu>
Mon, 3 Nov 2003 21:47:08 +0000 (16:47 -0500)
committerNathan Binkert <binkertn@umich.edu>
Mon, 3 Nov 2003 21:47:08 +0000 (16:47 -0500)
arch/alpha/isa_desc:
    move the quiesce instruction out of here so I can conditionally
    enable it.
arch/alpha/pseudo_inst.cc:
    conditionally enable quiesce
arch/alpha/pseudo_inst.hh:
    add quiesce

--HG--
extra : convert_revision : e1c474c4bf8761ff58073785d82b2bec9f632885

arch/alpha/isa_desc
arch/alpha/pseudo_inst.cc
arch/alpha/pseudo_inst.hh

index ec9fd183a8a02895833954df394560e04cd4f36b..4364bae34a1fe2e87f8655bd53374ce0119b85fa 100644 (file)
@@ -2410,11 +2410,8 @@ decode OPCODE default Unknown::unknown() {
                }
            }});
            0x01: quiesce({{
-               if (!xc->misspeculating()) {
-                   Annotate::QUIESCE(xc);
-                   xc->setStatus(ExecContext::Suspended);
-                   xc->kernelStats.quiesce();
-               }
+               if (!xc->misspeculating())
+                   AlphaPseudo::quiesce(xc);
            }});
            0x10: ivlb({{
                if (!xc->misspeculating()) {
index f8e0036ba26b8457a5a5ada5045dd34a4cb0f06d..c62de3ce6a6608425768beb022a8f8df634d120f 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "arch/alpha/pseudo_inst.hh"
 #include "cpu/exec_context.hh"
+#include "sim/annotation.hh"
 #include "sim/param.hh"
 #include "sim/serialize.hh"
 #include "sim/sim_exit.hh"
@@ -42,6 +43,18 @@ namespace AlphaPseudo
 {
     bool doStatisticsInsts;
     bool doCheckpointInsts;
+    bool doQuiesce;
+
+    void
+    quiesce(ExecContext *xc)
+    {
+        if (!doQuiesce)
+            return;
+
+        Annotate::QUIESCE(xc);
+        xc->setStatus(ExecContext::Suspended);
+        xc->kernelStats.quiesce();
+    }
 
     void
     m5exit_old(ExecContext *xc)
@@ -126,16 +139,20 @@ namespace AlphaPseudo
 
     Context context("PseudoInsts");
 
+    Param<bool> __quiesce(&context, "quiesce",
+                          "enable quiesce instructions",
+                          true);
     Param<bool> __statistics(&context, "statistics",
-                             "enable the statistics pseudo instructions",
+                             "enable statistics pseudo instructions",
                              true);
     Param<bool> __checkpoint(&context, "checkpoint",
-                             "enable the checkpoint pseudo instructions",
+                             "enable checkpoint pseudo instructions",
                              true);
 
     void
     Context::checkParams()
     {
+        doQuiesce = __quiesce;
         doStatisticsInsts = __statistics;
         doCheckpointInsts = __checkpoint;
     }
index b212a392cfcb1a1656e741399551ffd74178045e..60031f8cd3952e2bd41929606a22d5ddb40b99a0 100644 (file)
@@ -30,6 +30,7 @@ class ExecContext;
 
 namespace AlphaPseudo
 {
+    void quiesce(ExecContext *xc);
     void m5exit(ExecContext *xc);
     void m5exit_old(ExecContext *xc);
     void resetstats(ExecContext *xc);