File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,21 @@ enum TRAP_CODE {
96
96
ECALL_M = 11 ,
97
97
};
98
98
99
+ #define SET_SCAUSE_AND_STVAL_THEN_TRAP (rv , scause , stval ) \
100
+ { \
101
+ /* \
102
+ * To align rv32emu behavior with Spike \
103
+ * \
104
+ * If not in system mode, the __trap_handler \
105
+ * should be be invoked \
106
+ */ \
107
+ IIF (RV32_HAS (SYSTEM ))(rv -> is_trapped = true, ); \
108
+ rv -> csr_scause = scause ; \
109
+ rv -> csr_stval = stval ; \
110
+ rv -> io .on_trap (rv ); \
111
+ }
112
+
113
+
99
114
#define MISA_SUPER (1 << ('S' - 'A'))
100
115
#define MISA_USER (1 << ('U' - 'A'))
101
116
#define MISA_I (1 << ('I' - 'A'))
Original file line number Diff line number Diff line change 7
7
8
8
#include "riscv_private.h"
9
9
10
- #define SET_SCAUSE_AND_STVAL_THEN_TRAP (rv , scause , stval ) \
11
- { \
12
- /* \
13
- * To align rv32emu behavior with Spike \
14
- * \
15
- * If not in system mode, the __trap_handler \
16
- * should be be invoked \
17
- */ \
18
- IIF (RV32_HAS (SYSTEM ))(rv -> is_trapped = true, ); \
19
- rv -> csr_scause = scause ; \
20
- rv -> csr_stval = stval ; \
21
- rv -> io .on_trap (rv ); \
22
- }
23
-
24
10
/* PTE XWRV bit in order */
25
11
enum SV32_PTE_PERM {
26
12
NEXT_PG_TBL = 0b0001 ,
You can’t perform that action at this time.
0 commit comments