Skip to content

Commit 68d7534

Browse files
committed
test
1 parent aeda753 commit 68d7534

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/riscv.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ enum TRAP_CODE {
280280
* should be be invoked \
281281
*/ \
282282
IIF(RV32_HAS(SYSTEM))(rv->is_trapped = true;, ); \
283+
IIF(RV_PRIV_IS_U_OR_S_MODE())( \
284+
rv->csr_scause = cause; \
285+
rv->csr_stval = tval;, \
286+
rv->csr_mcause = cause; \
287+
rv->csr_mtval = tval; \
288+
); \
283289
rv->io.on_trap(rv); \
284290
}
285291
/* clang-format on */

0 commit comments

Comments
 (0)