1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test various M-mode CSRs.
10 #include "riscv_test.h"
11 #include "test_macros.h"
16 # Check that mcpuid reports the correct XLEN
18 TEST_CASE(2, a0, 0x2, csrr a0, misa; srl a0, a0, 62)
20 TEST_CASE(2, a0, 0x1, csrr a0, misa; srl a0, a0, 30)
23 # Check that mhartid reports 0
24 TEST_CASE(3, a0, 0x0, csrr a0, mhartid)
26 # Check that reading the following CSRs doesn't cause an exception
31 # Check that writing hte following CSRs doesn't cause an exception