aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Johnson <scottjohnsoninsf@gmail.com>2019-10-24 13:48:02 -0700
committerAndrew Waterman <andrew@sifive.com>2019-10-24 13:48:02 -0700
commit5652b9dd6298c7b61fe80bc2a508bbd3c9e5c5ef (patch)
treeb9bddf74067c2d0e64874465d9d2ef8c9340c0d8
parent66bf6ffa87154b002475e48bc3e3b7ba14060efc (diff)
downloadspike-5652b9dd6298c7b61fe80bc2a508bbd3c9e5c5ef.zip
spike-5652b9dd6298c7b61fe80bc2a508bbd3c9e5c5ef.tar.gz
spike-5652b9dd6298c7b61fe80bc2a508bbd3c9e5c5ef.tar.bz2
Initialize histogram_enabled and log_commits_enabled in constructor (#354)
Otherwise they are left uninitialized and causing bizarre reproducibility problems in my application.
-rw-r--r--riscv/processor.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc
index 5f956a1..00d36bc 100644
--- a/riscv/processor.cc
+++ b/riscv/processor.cc
@@ -23,6 +23,7 @@
processor_t::processor_t(const char* isa, const char* varch, simif_t* sim,
uint32_t id, bool halt_on_reset)
: debug(false), halt_request(false), sim(sim), ext(NULL), id(id),
+ histogram_enabled(false), log_commits_enabled(false),
halt_on_reset(halt_on_reset), last_pc(1), executions(1)
{
VU.p = this;