diff options
author | YenHaoChen <howard25336284@gmail.com> | 2023-05-04 08:11:32 +0800 |
---|---|---|
committer | Howard Yen-Hao Chen <yhchen@andestech.com> | 2023-06-23 14:27:17 +0800 |
commit | fb18fe2d93988e3b9d469f6681c48cdb6c6a7835 (patch) | |
tree | b3db00c4e450d4b5fa367dc76a7b701c50fbfac0 | |
parent | 71f5a8fd1b1185b7c15151f116aa3fef058bf210 (diff) | |
download | riscv-isa-sim-fb18fe2d93988e3b9d469f6681c48cdb6c6a7835.zip riscv-isa-sim-fb18fe2d93988e3b9d469f6681c48cdb6c6a7835.tar.gz riscv-isa-sim-fb18fe2d93988e3b9d469f6681c48cdb6c6a7835.tar.bz2 |
triggers: icount: not to decrease on firing icount trigger with Debug Mode action
The icount decreases on firing beakpoint action but not on entering Debug Mode action.
Reference: https://github.com/riscv/riscv-debug-spec/issues/842
-rw-r--r-- | riscv/triggers.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/triggers.cc b/riscv/triggers.cc index 65ba4c9..39a7330 100644 --- a/riscv/triggers.cc +++ b/riscv/triggers.cc @@ -317,7 +317,7 @@ std::optional<match_result_t> icount_t::detect_icount_match(processor_t * const ret = match_result_t(TIMING_BEFORE, action); } - if (count >= 1) { + if (count >= 1 && (ret == std::nullopt || action != MCONTROL_ACTION_DEBUG_MODE)) { if (count == 1) pending = 1; count = count - 1; |