1 #include "riscv_test.h"
2 #include "sv_test_macros.h"
4 RVTEST_RV64U # Define TVM used by program.
7 # SV test: vector-vector add different rd and rs1
9 # sets up x6 and x7 with data, sets VL to 2, and carries out
10 # an "x3 = 1 + x6". which actually means "x3 = 1 + x6 *AND* x4 = 1 + x7"
13 RVTEST_CODE_BEGIN # Start of test code.
15 SV_LD_DATA( x2, testdata , 0)
16 SV_LD_DATA( x6, testdata+8 , 0)
17 SV_LD_DATA( x7, testdata+16, 0)
18 SV_LD_DATA( x5, testdata+24, 0)
20 li x3, 0 # deliberately set x3 to 0 (target of add)
21 li x4, 0 # deliberately set x4 to 0
24 SET_SV_2CSRS( SV_REG_CSR(1, 3, 0, 3, 1),
25 SV_REG_CSR(1, 6, 0, 6, 1) )
34 TEST_SV_IMM(x2, 1001) # should not be modified
37 TEST_SV_IMM(x5, 1002) # should not be modified
39 RVTEST_PASS # Signal success.
42 RVTEST_CODE_END # End of test code.
45 # This section is optional, and this data is NOT saved in the output.
54 # Output data section.
55 RVTEST_DATA_BEGIN # Start of test output data region.
61 RVTEST_DATA_END # End of test output data region.