aboutsummaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorYenHaoChen <39526191+YenHaoChen@users.noreply.github.com>2022-10-05 06:22:15 +0800
committerGitHub <noreply@github.com>2022-10-04 17:22:15 -0500
commit3c9cfac9b1f7f1ddf07816f948c15f88aac27dcf (patch)
tree89d7d82d00c95c988290af70794cf10385b81ca5 /riscv
parent0bc176b3fca43560b9e8586cdbc41cfde073e17a (diff)
downloadspike-3c9cfac9b1f7f1ddf07816f948c15f88aac27dcf.zip
spike-3c9cfac9b1f7f1ddf07816f948c15f88aac27dcf.tar.gz
spike-3c9cfac9b1f7f1ddf07816f948c15f88aac27dcf.tar.bz2
Fix trigger mcontrol.chain match issue #599 #627 (#1083)
The variable chain_ok is used to indicate if the current trigger is suppressed by the trigger chain. A true value means the trigger is either un-chained or matches all previous triggers in the chain, and a false value means the trigger is chained and mismatches previous triggers. A false condition of variable chain_ok is missing. The false condition should be mcontrol.chain=1 and not matching; otherwise, the chain_ok=true (including initialization). The bug results in issues #559 and #627. Related issues: - https://github.com/riscv-software-src/riscv-isa-sim/issues/599 - https://github.com/riscv-software-src/riscv-isa-sim/issues/627 This PR fixes the issues #559 and #627.
Diffstat (limited to 'riscv')
-rw-r--r--riscv/triggers.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/triggers.cc b/riscv/triggers.cc
index 4b73715..ef05551 100644
--- a/riscv/triggers.cc
+++ b/riscv/triggers.cc
@@ -176,7 +176,7 @@ match_result_t module_t::memory_access_match(action_t * const action, operation_
return result;
}
- chain_ok = true;
+ chain_ok = result != MATCH_NONE || !triggers[i]->chain();
}
return MATCH_NONE;
}