Skip to content

Commit 576f105

Browse files
committed
Fix incorrect MSTATUS_MXR_SHIFT definition
The macro `MSTATUS_MXR_SHIFT` was wrongly defined as 18, duplicating the shift value of SUM. This commit corrects it to 19, which matches the specification. Key changes: Changed `#define MSTATUS_MXR_SHIFT` from 18 → 19 in src/riscv.h Signed-off-by: snnbyyds <[email protected]>
1 parent ccdcc30 commit 576f105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/riscv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ enum SV32_PTE_PERM {
142142
#define MSTATUS_MPP_SHIFT 11
143143
#define MSTATUS_MPRV_SHIFT 17
144144
#define MSTATUS_SUM_SHIFT 18
145-
#define MSTATUS_MXR_SHIFT 18
145+
#define MSTATUS_MXR_SHIFT 19
146146
#define MSTATUS_TVM_SHIFT 20
147147
#define MSTATUS_TW_SHIFT 21
148148
#define MSTATUS_TSR_SHIFT 22

0 commit comments

Comments
 (0)