@@ -5,40 +5,37 @@ kind: instruction
55name : wrs.nto
66long_name : Wait-on-Reservation-Set-with-No-Timeout
77description : |
8- -id: inst-wrs.nto-behaviour
9- -normative: false
10- -text: |
11- To mitigate the wasteful looping in such usages, a `wrs.nto` (WRS-with-no-timeout) instruction is provided.
12- Instead of polling for a store to a specific memory location, software registers a reservation set that
13- includes all the bytes of the memory location using the LR instruction. Then a subsequent `wrs.nto`
14- instruction would cause the hart to temporarily stall execution in a low-power state until a store
15- occurs to the reservation set or an interrupt is observed.
8+ To mitigate the wasteful looping in such usages, a `wrs.nto` (WRS-with-no-timeout) instruction is provided.
9+ Instead of polling for a store to a specific memory location, software registers a reservation set that
10+ includes all the bytes of the memory location using the LR instruction. Then a subsequent `wrs.nto`
11+ instruction would cause the hart to temporarily stall execution in a low-power state until a store
12+ occurs to the reservation set or an interrupt is observed.
1613
17- This instruction is not supported in a constrained LR/SC loop.
18- While stalled, an implementation is permitted to occasionally terminate the stall and complete
19- execution for any reason.
14+ This instruction is not supported in a constrained LR/SC loop.
15+ While stalled, an implementation is permitted to occasionally terminate the stall and complete
16+ execution for any reason.
2017
21- `wrs.nto` follows the rules of the WFI instruction for resuming execution
22- on a pending interrupt.
18+ `wrs.nto` follows the rules of the WFI instruction for resuming execution
19+ on a pending interrupt.
2320
24- When the TW (Timeout Wait) bit in `mstatus` is set and `wrs.nto` is executed
25- in any privilege mode otherthan M mode, and it does not complete within an implementation-specific
26- bounded time limit, the `wrs.nto` instruction will cause an illegal instruction exception.
21+ When the TW (Timeout Wait) bit in `mstatus` is set and `wrs.nto` is executed
22+ in any privilege mode otherthan M mode, and it does not complete within an implementation-specific
23+ bounded time limit, the `wrs.nto` instruction will cause an illegal instruction exception.
2724
28- When executing in VS or VU mode, if the VTW bit is set in `hstatus`, the TW bit in `mstatus` is clear,
29- and the `wrs.nto` does not complete within an implementation-specific bounded time limit,
30- the `wrs.nto` instruction will cause a virtual instruction exception.
25+ When executing in VS or VU mode, if the VTW bit is set in `hstatus`, the TW bit in `mstatus` is clear,
26+ and the `wrs.nto` does not complete within an implementation-specific bounded time limit,
27+ the `wrs.nto` instruction will cause a virtual instruction exception.
3128
32- [Note]
33- Since `wrs.nto` can complete execution for reasons other than stores to the reservation set,
34- software will likely need a means of looping until the required stores have occurred.
29+ [Note]
30+ Since `wrs.nto` can complete execution for reasons other than stores to the reservation set,
31+ software will likely need a means of looping until the required stores have occurred.
3532
36- [Note]
37- `wrs.nto`, unlike WFI, is not specified to cause an illegal instruction exception if executed in U-mode
38- when the governing TW bit is 0. WFI is typically not expected to be used in U-mode and on many systems
39- may promptly cause an illegal instruction exception if used at U-mode.
40- Unlike WFI, `wrs.nto` is expected to be used by software in U-mode when waiting on memory but without
41- a deadline for that wait.
33+ [Note]
34+ `wrs.nto`, unlike WFI, is not specified to cause an illegal instruction exception if executed in U-mode
35+ when the governing TW bit is 0. WFI is typically not expected to be used in U-mode and on many systems
36+ may promptly cause an illegal instruction exception if used at U-mode.
37+ Unlike WFI, `wrs.nto` is expected to be used by software in U-mode when waiting on memory but without
38+ a deadline for that wait.
4239definedBy : Zawrs
4340assembly : " "
4441encoding :
0 commit comments