From 0f589618ad654d808932c81f6f15d64e2e9e4651 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 24 Mar 2017 12:50:26 -0700 Subject: Avoid misa in physical memory tests The spec allows it to be hardwired to 0, so don't rely on its value. --- p/riscv_test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p/riscv_test.h b/p/riscv_test.h index e28c5e5..3b3fcaa 100644 --- a/p/riscv_test.h +++ b/p/riscv_test.h @@ -48,9 +48,9 @@ .endm #if __riscv_xlen == 64 -# define CHECK_XLEN csrr a0, misa; bltz a0, 1f; RVTEST_PASS; 1: +# define CHECK_XLEN li a0, 1; slli a0, a0, 31; bgez a0, 1f; RVTEST_PASS; 1: #else -# define CHECK_XLEN csrr a0, misa; bgez a0, 1f; RVTEST_PASS; 1: +# define CHECK_XLEN li a0, 1; slli a0, a0, 31; bltz a0, 1f; RVTEST_PASS; 1: #endif #define INIT_SPTBR \ -- cgit v1.1