Copy implementations
[gem5.git] / arch / alpha / pseudo_inst.cc
index f8e0036ba26b8457a5a5ada5045dd34a4cb0f06d..7f8c6b17ccf4542223ac70aa3f3cd6aa7182a655 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->suspend();
+        xc->kernelStats.quiesce();
+    }
 
     void
     m5exit_old(ExecContext *xc)
@@ -114,7 +127,7 @@ namespace AlphaPseudo
         Tick when = curTick + NS2Ticks(delay);
         Tick repeat = NS2Ticks(period);
 
-        SetupCheckpoint(when, repeat);
+        Checkpoint::setup(when, repeat);
     }
 
     class Context : public ParamContext
@@ -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;
     }