Skip to content

Commit

Permalink
fix(dbltrp): No critical error is reported when comparing with Xiangs…
Browse files Browse the repository at this point in the history
…han.
  • Loading branch information
lewislzh authored and huxuan0307 committed Nov 1, 2024
1 parent 63941ad commit 861f8d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/isa/riscv64/system/intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ word_t raise_intr(word_t NO, vaddr_t epc) {
case EX_SPF: difftest_skip_dut(1, 2); break;
}
#endif
MUXDEF(CONFIG_RV_SMRNMI,Assert( mnstatus->nmie, "critical error: trap when nmie close"), );
#ifdef CONFIG_RV_SMRNMI
#ifdef CONFIG_SHARE
if (!mnstatus->nmie){return 0; } // this will assert in difftest
#else
Assert(mnstatus->nmie, "critical error: trap when nmie close");
#endif // CONFIG_SHARE
#endif // CONFIG_RV_SMRNMI
bool isNMI = MUXDEF(CONFIG_RV_SMRNMI, cpu.hasNMI && (NO & INTR_BIT), false);
bool delegS = intr_deleg_S(NO);
bool delegM = !delegS && !isNMI;
Expand Down

0 comments on commit 861f8d3

Please sign in to comment.