icount triggers are subject to textra checks, per spec.
Signed-off-by: Nicholas Piggin <[email protected]>
---
target/riscv/debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/riscv/debug.c b/target/riscv/debug.c
index ecedffd3b9..d835c0e79a 100644
--- a/target/riscv/debug.c
+++ b/target/riscv/debug.c
@@ -675,11 +675,12 @@ static bool check_itrigger_priv(CPURISCVState *env, int
index)
bool riscv_itrigger_enabled(CPURISCVState *env)
{
int count;
+
for (int i = 0; i < RV_MAX_TRIGGERS; i++) {
if (get_trigger_type(env, i) != TRIGGER_TYPE_INST_CNT) {
continue;
}
- if (!check_itrigger_priv(env, i)) {
+ if (!trigger_common_match(env, TRIGGER_TYPE_INST_CNT, i)) {
continue;
}
count = itrigger_get_count(env, i);
--
2.51.0