Use XLEN macro for these sources as well.
authorTim Newsome <tim@sifive.com>
Thu, 8 Dec 2016 04:42:31 +0000 (20:42 -0800)
committerTim Newsome <tim@sifive.com>
Thu, 8 Dec 2016 04:42:31 +0000 (20:42 -0800)
All tests pass on spike32 and spike64 again.

debug/programs/entry.S
debug/programs/mprv.S
debug/programs/trigger.S

index a2c730413d91d4462cdf953f33401893f3060941..a5e745d181ff8b25ecfddc673da06dbf7488e690 100755 (executable)
@@ -5,7 +5,7 @@
 
 #define STACK_SIZE 512
 
-#if __riscv_xlen == 64
+#if XLEN == 64
 # define LREG ld
 # define SREG sd
 # define REGBYTES 8
index 5e216078b3fd6a86dcab81cae9f18ad2cb46fc58..574f32e62a562a69732dd74af4903f6bf6baa841 100644 (file)
@@ -12,7 +12,7 @@ main:
 
         # update mstatus
         csrr    t1, CSR_MSTATUS
-#if __riscv_xlen == 32
+#if 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:
-#if __riscv_xlen == 32
+#if 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)
index 48cd68b024ee46df6ed2b13343a6cfa648ab2a88..d87b71e1fc35ef0f6f587b84075e68a9497f457a 100644 (file)
@@ -1,6 +1,6 @@
 #include "../../env/encoding.h"
 
-#if __riscv_xlen == 64
+#if XLEN == 64
 # define LREG ld
 # define SREG sd
 # define REGBYTES 8