From 5ae66cca486cabfd67cf0844406f04f5585fee29 Mon Sep 17 00:00:00 2001 From: snnbyyds Date: Sun, 21 Sep 2025 09:53:22 +0800 Subject: [PATCH] Correct MSTATUS_MXR_SHIFT definition MSTATUS_MXR_SHIFT was incorrectly defined as 18, duplicating the SUM shift value, and is corrected to 19 to match the RISC-V specification. Signed-off-by: snnbyyds --- src/riscv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/riscv.h b/src/riscv.h index 63f375be..8ff55f49 100644 --- a/src/riscv.h +++ b/src/riscv.h @@ -142,7 +142,7 @@ enum SV32_PTE_PERM { #define MSTATUS_MPP_SHIFT 11 #define MSTATUS_MPRV_SHIFT 17 #define MSTATUS_SUM_SHIFT 18 -#define MSTATUS_MXR_SHIFT 18 +#define MSTATUS_MXR_SHIFT 19 #define MSTATUS_TVM_SHIFT 20 #define MSTATUS_TW_SHIFT 21 #define MSTATUS_TSR_SHIFT 22