From b586e3af37a3534abd8b7690b0f77e563a705bbf Mon Sep 17 00:00:00 2001 From: DTowersM Date: Fri, 10 Jun 2022 01:44:52 +0000 Subject: [PATCH] added some comments to help debuggers in the future --- .../riscv-test-suite/rv32i_m/privilege/src/WALLY-wfi-01.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-wfi-01.S b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-wfi-01.S index 55c6cc546..b086809a1 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-wfi-01.S +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-wfi-01.S @@ -33,6 +33,8 @@ WRITE_READ_CSR mie, 0xFFF // Enable interrupts from all sources // Code copied from test library to cause m time interrupt, with time loop replaced with wfi. +/* Note: the following line might cause problems in the future. If more than 0x50 cycles are needed before the wfi + instruction begins, then the program might fall into a loop and run forever*/ li x28, 0x50 // Desired offset from the present time mv a3, x28 // copy value in to know to stop waiting for interrupt after this many cycles la x29, 0x02004000 // MTIMECMP register in CLINT