diff options
author | YenHaoChen <howard25336284@gmail.com> | 2023-01-11 22:03:07 +0800 |
---|---|---|
committer | YenHaoChen <howard25336284@gmail.com> | 2023-01-13 12:07:45 +0800 |
commit | 1fc34a04d6ee3c78d5749c79a87fee8fb43ab8ee (patch) | |
tree | 6a60ceb334d65e0996bf16f3abb8aca7b534f101 | |
parent | 888ef08c02913abb9b9749d928d5de0da84d0ee9 (diff) | |
download | riscv-isa-sim-1fc34a04d6ee3c78d5749c79a87fee8fb43ab8ee.zip riscv-isa-sim-1fc34a04d6ee3c78d5749c79a87fee8fb43ab8ee.tar.gz riscv-isa-sim-1fc34a04d6ee3c78d5749c79a87fee8fb43ab8ee.tar.bz2 |
triggers: refactor: use static and remove const for legalize_match()
Since this method no longer use 'this', we turn this method into static.
-rw-r--r-- | riscv/triggers.cc | 2 | ||||
-rw-r--r-- | riscv/triggers.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/riscv/triggers.cc b/riscv/triggers.cc index fa04325..3339d38 100644 --- a/riscv/triggers.cc +++ b/riscv/triggers.cc @@ -221,7 +221,7 @@ std::optional<match_result_t> mcontrol_common_t::detect_memory_access_match(proc return std::nullopt; } -mcontrol_common_t::match_t mcontrol_common_t::legalize_match(reg_t val) const noexcept +mcontrol_common_t::match_t mcontrol_common_t::legalize_match(reg_t val) noexcept { switch (val) { case MATCH_EQUAL: diff --git a/riscv/triggers.h b/riscv/triggers.h index 074c7b6..f141560 100644 --- a/riscv/triggers.h +++ b/riscv/triggers.h @@ -207,7 +207,7 @@ private: bool simple_match(unsigned xlen, reg_t value) const; protected: - match_t legalize_match(reg_t val) const noexcept; + static match_t legalize_match(reg_t val) noexcept; static bool legalize_timing(reg_t val, reg_t timing_mask, reg_t select_mask, reg_t execute_mask, reg_t load_mask) noexcept; bool dmode = false; action_t action = ACTION_DEBUG_EXCEPTION; |