From da579c14c98f72bdc210ac7dc070ae85d6ce6d1e Mon Sep 17 00:00:00 2001 From: Yunsup Lee Date: Wed, 16 Oct 2013 14:27:12 -0700 Subject: [PATCH] use reset virtual method --- hwacha/hwacha.cc | 2 +- hwacha/hwacha.h | 5 +++-- riscv/extension.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hwacha/hwacha.cc b/hwacha/hwacha.cc index 61282d3..bd76f6b 100644 --- a/hwacha/hwacha.cc +++ b/hwacha/hwacha.cc @@ -17,7 +17,7 @@ void ut_state_t::reset() FPR.reset(); } -hwacha_t::hwacha_t() +void hwacha_t::reset() { ct_state.reset(); for (int i=0; i get_instructions(); + const char* name() { return "hwacha"; } + void reset(); + ct_state_t* get_ct_state() { return &ct_state; } ut_state_t* get_ut_state(int idx) { return &ut_state[idx]; } bool vf_active(); diff --git a/riscv/extension.h b/riscv/extension.h index 7e9bfe5..da42db9 100644 --- a/riscv/extension.h +++ b/riscv/extension.h @@ -12,10 +12,10 @@ class extension_t public: virtual std::vector get_instructions() = 0; virtual const char* name() = 0; + virtual void reset() {}; virtual ~extension_t(); void set_processor(processor_t* _p) { p = _p; } - virtual void reset() {}; protected: processor_t* p; -- 2.30.2