initial commit
[riscv-tests.git] / isa / rv64ui / auipc.S
1 #*****************************************************************************
2 # auipc.S
3 #-----------------------------------------------------------------------------
4 #
5 # Test auipc instruction.
6 #
7
8 #include "riscv_test.h"
9 #include "test_macros.h"
10
11 RVTEST_RV64U
12 RVTEST_CODE_BEGIN
13
14 TEST_CASE(2, a0, -4096+8, \
15 auipc a0, 0x00001; \
16 jal 1f; \
17 1: sub a0, ra, a0; \
18 )
19
20 TEST_CASE(3, a0, 4096+8, \
21 auipc a0, 0xfffff; \
22 jal 1f; \
23 1: sub a0, ra, a0; \
24 )
25
26 TEST_PASSFAIL
27
28 RVTEST_CODE_END
29
30 .data
31 RVTEST_DATA_BEGIN
32
33 TEST_DATA
34
35 RVTEST_DATA_END