1 #include "riscv_test.h"
2 #include "sv_test_macros.h"
4 RVTEST_RV64U # Define TVM used by program.
9 RVTEST_CODE_BEGIN # Start of test code.
15 li x1, SV_REG_CSR(1, 2, 0, 2, 1, 0)
18 addi x2, x2, 1 # Should be 42 into $2.
22 li x1, 42 # Desired result 1
23 bne x2, x1, fail # Fail out if doesn't match.
24 li x1, 43 # Desired result 2
25 bne x3, x1, fail # Fail out if doesn't match.
26 RVTEST_PASS # Signal success.
29 RVTEST_CODE_END # End of test code.
32 # This section is optional, and this data is NOT saved in the output.
40 # Output data section.
41 RVTEST_DATA_BEGIN # Start of test output data region.
47 RVTEST_DATA_END # End of test output data region.