8e569097208561ebcd3e8a54309c4acdae6d67ae
[riscv-tests.git] / isa / rv64si / wfi.S
1 # See LICENSE for license details.
2
3 #*****************************************************************************
4 # wfi.S
5 #-----------------------------------------------------------------------------
6 #
7 # Test wait-for-interrupt instruction.
8 #
9
10 #include "riscv_test.h"
11 #include "test_macros.h"
12
13 RVTEST_RV64S
14 RVTEST_CODE_BEGIN
15
16 # Make sure wfi doesn't stall if an interrupt is pending, even if masked
17 csrc sstatus, SSTATUS_SIE
18 csrs sip, MIP_SSIP
19 wfi
20
21 RVTEST_PASS
22
23 TEST_PASSFAIL
24
25 RVTEST_CODE_END
26
27 .data
28 RVTEST_DATA_BEGIN
29
30 TEST_DATA
31
32 RVTEST_DATA_END