Skip to content

Commit b44a5af

Browse files
committed
test
1 parent 68d7534 commit b44a5af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/riscv.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,13 @@ 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())( \
283+
if(RV_PRIV_IS_U_OR_S_MODE()){ \
284284
rv->csr_scause = cause; \
285-
rv->csr_stval = tval;, \
285+
rv->csr_stval = tval; \
286+
} else { \
286287
rv->csr_mcause = cause; \
287288
rv->csr_mtval = tval; \
288-
); \
289+
} \
289290
rv->io.on_trap(rv); \
290291
}
291292
/* clang-format on */

0 commit comments

Comments
 (0)