X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=debug%2Fprograms%2Fmprv.S;h=5e216078b3fd6a86dcab81cae9f18ad2cb46fc58;hb=56f46aa0f9688c87ce9ebd7658e19b884b018b6b;hp=115ccb5b9fead1537d37f83fdaf62119c9bc1f19;hpb=b68b39031a730ecc155ed87fba2ed5f111d0ab07;p=riscv-tests.git diff --git a/debug/programs/mprv.S b/debug/programs/mprv.S index 115ccb5..5e21607 100644 --- a/debug/programs/mprv.S +++ b/debug/programs/mprv.S @@ -12,7 +12,7 @@ main: # update mstatus csrr t1, CSR_MSTATUS -#ifdef __riscv32 +#if __riscv_xlen == 32 li t0, (MSTATUS_MPRV | (VM_SV32 << 24)) #else li t0, (MSTATUS_MPRV | (VM_SV39 << 24)) @@ -38,7 +38,7 @@ data: .balign 0x1000 page_table: -#ifdef __riscv32 +#if __riscv_xlen == 32 .word ((0x80000000 >> 2) | PTE_V | PTE_R | PTE_W | PTE_X | PTE_G | PTE_U) #else .word ((0x80000000 >> 2) | PTE_V | PTE_R | PTE_W | PTE_X | PTE_G | PTE_U)