Test mstatus.TW, mstatus.TVM, and mstatus.TSR features
[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 halt the hart, even if interrupts are disabled
17 csrc sstatus, SSTATUS_SIE
18 csrs sie, SIP_SSIP
19 csrs sip, SIP_SSIP
20 wfi
21
22 RVTEST_PASS
23
24 TEST_PASSFAIL
25
26 RVTEST_CODE_END
27
28 .data
29 RVTEST_DATA_BEGIN
30
31 TEST_DATA
32
33 RVTEST_DATA_END