From c0cc59d5c4febaf1f45688e865e39e55b4cc72e3 Mon Sep 17 00:00:00 2001 From: YenHaoChen Date: Wed, 4 Jan 2023 09:26:47 +0800 Subject: triggers: refactor: move get_action() to trap_common_t from itrigger_t/etrigger_t --- riscv/triggers.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/riscv/triggers.h b/riscv/triggers.h index 90c2040..dec4d98 100644 --- a/riscv/triggers.h +++ b/riscv/triggers.h @@ -148,6 +148,7 @@ private: class trap_common_t : public trigger_t { public: bool get_dmode() const override { return dmode; } + virtual action_t get_action() const override { return action; } protected: bool dmode; @@ -160,8 +161,6 @@ public: virtual reg_t tdata1_read(const processor_t * const proc) const noexcept override; virtual void tdata1_write(processor_t * const proc, const reg_t val, const bool allow_chain) noexcept override; - virtual action_t get_action() const override { return action; } - virtual std::optional detect_trap_match(processor_t * const proc, const trap_t& t) noexcept override; private: @@ -174,8 +173,6 @@ public: virtual reg_t tdata1_read(const processor_t * const proc) const noexcept override; virtual void tdata1_write(processor_t * const proc, const reg_t val, const bool allow_chain) noexcept override; - virtual action_t get_action() const override { return action; } - virtual std::optional detect_trap_match(processor_t * const proc, const trap_t& t) noexcept override; private: -- cgit v1.1