diff options
author | Nathan Binkert <binkertn@umich.edu> | 2003-11-02 20:52:40 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2003-11-02 20:52:40 -0500 |
commit | 136ee73a58651f5e656a1245de9cdb716926cccd (patch) | |
tree | 8139a9b05cb1532e7bdf811ff8a384a1cd1112e7 /arch | |
parent | d76445f9f37896227f1d4e61348a418aa7ab6371 (diff) | |
download | gem5-136ee73a58651f5e656a1245de9cdb716926cccd.tar.xz |
Add the option to ignore some of the pseudo instructions
--HG--
extra : convert_revision : 2010782749ca9c5dd029f71480956b8a1fa96394
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/pseudo_inst.cc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/alpha/pseudo_inst.cc b/arch/alpha/pseudo_inst.cc index 1f24a07f5..d5d00bb18 100644 --- a/arch/alpha/pseudo_inst.cc +++ b/arch/alpha/pseudo_inst.cc @@ -26,16 +26,23 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <string> + #include "arch/alpha/pseudo_inst.hh" #include "cpu/exec_context.hh" +#include "sim/param.hh" #include "sim/serialize.hh" #include "sim/sim_exit.hh" #include "sim/sim_stats.hh" +using namespace std; using namespace Statistics; namespace AlphaPseudo { + bool doStatisticsInsts; + bool doCheckpointInsts; + void m5exit_old(ExecContext *xc) { @@ -53,6 +60,9 @@ namespace AlphaPseudo void resetstats(ExecContext *xc) { + if (!doStatisticsInsts) + return; + Tick delay = xc->regs.intRegFile[16]; Tick period = xc->regs.intRegFile[17]; @@ -65,6 +75,9 @@ namespace AlphaPseudo void dumpstats(ExecContext *xc) { + if (!doStatisticsInsts) + return; + Tick delay = xc->regs.intRegFile[16]; Tick period = xc->regs.intRegFile[17]; @@ -77,6 +90,9 @@ namespace AlphaPseudo void dumpresetstats(ExecContext *xc) { + if (!doStatisticsInsts) + return; + Tick delay = xc->regs.intRegFile[16]; Tick period = xc->regs.intRegFile[17]; @@ -89,6 +105,9 @@ namespace AlphaPseudo void m5checkpoint(ExecContext *xc) { + if (!doCheckpointInsts) + return; + Tick delay = xc->regs.intRegFile[16]; Tick period = xc->regs.intRegFile[17]; @@ -98,4 +117,22 @@ namespace AlphaPseudo SetupCheckpoint(when, repeat); } + class Context : public ParamContext + { + public: + Context(const string §ion) : ParamContext(section) {} + void checkParams(); + }; + + Context context("PseudoInsts"); + + Param<bool> __statistics(&context, "statistics", "yes"); + Param<bool> __checkpoint(&context, "checkpoint", "yes"); + + void + Context::checkParams() + { + doStatisticsInsts = __statistics; + doCheckpointInsts = __checkpoint; + } } |