Supervisor Control Transfer Record (CTR) clear
When `mstateen0.CTR`=1, the SCTRCLR instruction performs the following operations:
* Zeroes all CTR Entry Registers, for all DEPTH values * Reset to Zero the optional CTR cycle counter where implemented ** `ctrdata.CC` and `ctrdata.CCV` bit fields.
Any read of `ctrsource`, `ctrtarget`, or `ctrdata` that follows SCTRCLR, such that it precedes the next qualified control transfer, will return the value 0.
Further, the first recorded transfer following SCTRCLR will have `ctrdata.CCV`=0.
SCTRCLR execution causes an `IllegalInstruction` exception if:
* `Smctr` is not implemented * The instruction is executed in S/VS/VU-mode and `Ssctr` is not implemented, or `mstateen0.CTR`=0 * The instruction is executed in U-mode
SCTRCLR execution causes a `VirtualInstruciton` exception if `mstateen0.CTR`=1 and:
* The instruction is executed in VS-mode and `hstateen0.CTR`=0 * The instruction is executed in VU-mode
sctrclr
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 000 | 1 | 00000 | 1 | 000000000000000 | 111 | 00 | 11 | ||||||||||||||||||||||||
No execution pseudocode is available for this instruction.
Smctr or Ssctr
| S | U | VS | VU |
|---|---|---|---|
| Always | Always | Always | Always |
Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.