All tests pass with spike now.
[riscv-tests.git] / debug / programs / regs.S
index 54b39616b9c542d2196516c1a38a99aa513591ef..65b62ecb29a0b25ca2311db6da4c9d2f0b5e6a46 100644 (file)
@@ -8,6 +8,8 @@
 # define REGBYTES 4
 #endif
 
+#include "../../env/encoding.h"
+
         .global main
 main:
         j       main
@@ -44,10 +46,11 @@ write_regs:
         SREG    x30, 224(a0)
         SREG    x31, 232(a0)
 
-        csrr    x1, 1   # fflags
+        csrr    x1, CSR_MSCRATCH
 
 all_done:
         j       all_done
 
+        .align  16
 data:
         .fill   64, 8, 0