diff options
author | YenHaoChen <howard25336284@gmail.com> | 2023-08-01 14:44:07 +0800 |
---|---|---|
committer | YenHaoChen <howard25336284@gmail.com> | 2023-09-13 09:04:43 +0800 |
commit | 7b3b2e94adefa63a31c73267af21819ad833aba0 (patch) | |
tree | 458e612b986d092ee7556215d7b6814be70dc3e1 /riscv/triggers.h | |
parent | eb9a55a519634c146bc7f287e99315654f3067ad (diff) | |
download | riscv-isa-sim-7b3b2e94adefa63a31c73267af21819ad833aba0.zip riscv-isa-sim-7b3b2e94adefa63a31c73267af21819ad833aba0.tar.gz riscv-isa-sim-7b3b2e94adefa63a31c73267af21819ad833aba0.tar.bz2 |
triggers: refactor: icount: breakdown detect_icount_match() into detect_icount_fire() and detect_icount_decrement()
Diffstat (limited to 'riscv/triggers.h')
-rw-r--r-- | riscv/triggers.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/riscv/triggers.h b/riscv/triggers.h index 0bf6097..6f00122 100644 --- a/riscv/triggers.h +++ b/riscv/triggers.h @@ -85,7 +85,8 @@ public: virtual std::optional<match_result_t> detect_memory_access_match(processor_t UNUSED * const proc, operation_t UNUSED operation, reg_t UNUSED address, std::optional<reg_t> UNUSED data) noexcept { return std::nullopt; } - virtual std::optional<match_result_t> detect_icount_match(processor_t UNUSED * const proc) { return std::nullopt; } + virtual std::optional<match_result_t> detect_icount_fire(processor_t UNUSED * const proc) { return std::nullopt; } + virtual void detect_icount_decrement(processor_t UNUSED * const proc) {} virtual std::optional<match_result_t> detect_trap_match(processor_t UNUSED * const proc, const trap_t UNUSED & t) noexcept { return std::nullopt; } protected: @@ -248,7 +249,8 @@ public: virtual bool icount_check_needed() const override { return count > 0 || pending; } virtual void stash_read_values() override; - virtual std::optional<match_result_t> detect_icount_match(processor_t * const proc) noexcept override; + virtual std::optional<match_result_t> detect_icount_fire(processor_t * const proc) noexcept override; + virtual void detect_icount_decrement(processor_t * const proc) noexcept override; private: bool dmode = false; |