aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Johnson <scott.johnson@arilinc.com>2023-02-24 09:44:32 -0800
committerScott Johnson <scott.johnson@arilinc.com>2023-04-04 09:21:39 -0700
commite4325fda2776e065400a791accb083a76db6f511 (patch)
tree0d74c24088a84963adc91cc5980f79cc5a96677f
parentdc109aeb94b8644e9095f1b3a32fc1c5720088c4 (diff)
downloadriscv-isa-sim-e4325fda2776e065400a791accb083a76db6f511.zip
riscv-isa-sim-e4325fda2776e065400a791accb083a76db6f511.tar.gz
riscv-isa-sim-e4325fda2776e065400a791accb083a76db6f511.tar.bz2
Initialize all fields of icount_t
According to table in debug spec. This has no visible effect, because every time we instantiate an icount_t (in triggers::module_t::tdata1_write) we immediately call tdata1_write() which sets these values, but it's cleaner this way.
-rw-r--r--riscv/triggers.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/riscv/triggers.h b/riscv/triggers.h
index 199a3c2..0c9dabc 100644
--- a/riscv/triggers.h
+++ b/riscv/triggers.h
@@ -249,11 +249,11 @@ public:
virtual std::optional<match_result_t> detect_icount_match(processor_t * const proc) noexcept override;
private:
- bool dmode;
- bool hit;
- unsigned count, count_read_value;
- bool pending, pending_read_value;
- action_t action;
+ bool dmode = false;
+ bool hit = false;
+ unsigned count = 1, count_read_value = 1;
+ bool pending = false, pending_read_value = false;
+ action_t action = (action_t)0;
};
class module_t {