aboutsummaryrefslogtreecommitdiff
path: root/riscv/triggers.cc
diff options
context:
space:
mode:
authorYenHaoChen <howard25336284@gmail.com>2023-01-12 08:51:36 +0800
committerYenHaoChen <howard25336284@gmail.com>2023-01-13 12:07:45 +0800
commite3efb15eca0b020ecc0c6db4e5c6ad48501a8708 (patch)
treef412f1bb4502205c84578de338e22acf8c2e1d3e /riscv/triggers.cc
parent1fc34a04d6ee3c78d5749c79a87fee8fb43ab8ee (diff)
downloadriscv-isa-sim-e3efb15eca0b020ecc0c6db4e5c6ad48501a8708.zip
riscv-isa-sim-e3efb15eca0b020ecc0c6db4e5c6ad48501a8708.tar.gz
riscv-isa-sim-e3efb15eca0b020ecc0c6db4e5c6ad48501a8708.tar.bz2
triggers: refactor: use static and remove const for legalize_action()
Since this method does not use 'this', we turn this method into static.
Diffstat (limited to 'riscv/triggers.cc')
-rw-r--r--riscv/triggers.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/triggers.cc b/riscv/triggers.cc
index 3339d38..64de725 100644
--- a/riscv/triggers.cc
+++ b/riscv/triggers.cc
@@ -25,7 +25,7 @@ void trigger_t::tdata2_write(processor_t UNUSED * const proc, const reg_t UNUSED
tdata2 = val;
}
-action_t trigger_t::legalize_action(reg_t val, reg_t action_mask, reg_t dmode_mask) const noexcept {
+action_t trigger_t::legalize_action(reg_t val, reg_t action_mask, reg_t dmode_mask) noexcept {
reg_t act = get_field(val, action_mask);
return (act > ACTION_MAXVAL || (act == ACTION_DEBUG_MODE && get_field(val, dmode_mask) == 0)) ? ACTION_DEBUG_EXCEPTION : (action_t)act;
}