rv32mi_sc_tests = \
csr \
+ dirty \
illegal \
ma_fetch \
ma_addr \
+ mcsr \
scall \
sbreak \
shamt \
timer \
+ wfi \
rv32mi_mc_tests = \
ipi \
--- /dev/null
+# See LICENSE for license details.
+
+#include "riscv_test.h"
+#undef RVTEST_RV64M
+#define RVTEST_RV64M RVTEST_RV32M
+
+#undef VM_SV39
+#define VM_SV39 VM_SV32
+
+#include "../rv64mi/dirty.S"
--- /dev/null
+# See LICENSE for license details.
+
+#include "riscv_test.h"
+#undef RVTEST_RV64M
+#define RVTEST_RV64M RVTEST_RV32M
+
+#include "../rv64mi/mcsr.S"
--- /dev/null
+# See LICENSE for license details.
+
+#include "riscv_test.h"
+#undef RVTEST_RV64S
+#define RVTEST_RV64S RVTEST_RV32M
+#define __MACHINE_MODE
+
+#include "../rv64si/wfi.S"
ma_fetch \
scall \
sbreak \
+ wfi \
rv32si_p_tests = $(addprefix rv32si-p-, $(rv32si_sc_tests))
--- /dev/null
+# See LICENSE for license details.
+
+#include "riscv_test.h"
+#undef RVTEST_RV64S
+#define RVTEST_RV64S RVTEST_RV32S
+
+#include "../rv64si/wfi.S"
# Try a faulting store to make sure dirty bit is not set
li TESTNUM, 2
li t0, 1
- sd t0, dummy, t1
+ sw t0, dummy, t1
# Load new page table
li TESTNUM, 3
sfence.vm
# Try a non-faulting store to make sure dirty bit is set
- sd t0, dummy, t1
+ sw t0, dummy, t1
# Make sure R and D bits are set
lw t0, page_table_2
RVTEST_RV64M
RVTEST_CODE_BEGIN
- # Check that mcpuid reports RV64
+ # Check that mcpuid reports the correct XLEN
+#ifdef __riscv64
TEST_CASE(2, a0, 0x2, csrr a0, misa; srl a0, a0, 62)
+#else
+ TEST_CASE(2, a0, 0x0, csrr a0, misa; srl a0, a0, 30)
+#endif
# Check that mhartid reports 0
TEST_CASE(3, a0, 0x0, csrr a0, mhartid)