summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-11-03 16:47:08 -0500
committerNathan Binkert <binkertn@umich.edu>2003-11-03 16:47:08 -0500
commitc55e6b495e569e2b908ab4f58c3ecb529c64f288 (patch)
tree2833abb1afd375b0f0d43f11f83088cd49df1ee6 /arch
parentad8c0da4a40536440c9fda215ce3169334ab09e2 (diff)
downloadgem5-c55e6b495e569e2b908ab4f58c3ecb529c64f288.tar.xz
Make it so the quiesce instruction is conditionally enabled
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
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/isa_desc7
-rw-r--r--arch/alpha/pseudo_inst.cc21
-rw-r--r--arch/alpha/pseudo_inst.hh1
3 files changed, 22 insertions, 7 deletions
diff --git a/arch/alpha/isa_desc b/arch/alpha/isa_desc
index ec9fd183a..4364bae34 100644
--- a/arch/alpha/isa_desc
+++ b/arch/alpha/isa_desc
@@ -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()) {
diff --git a/arch/alpha/pseudo_inst.cc b/arch/alpha/pseudo_inst.cc
index f8e0036ba..c62de3ce6 100644
--- a/arch/alpha/pseudo_inst.cc
+++ b/arch/alpha/pseudo_inst.cc
@@ -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;
}
diff --git a/arch/alpha/pseudo_inst.hh b/arch/alpha/pseudo_inst.hh
index b212a392c..60031f8cd 100644
--- a/arch/alpha/pseudo_inst.hh
+++ b/arch/alpha/pseudo_inst.hh
@@ -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);