Capability register cd is set equal to special capability register scr, and scr is set equal to capability register cs1 if cs1 is not C0. Exceptions An exception is raised if: - scr does not exist. - scr requires Permit_Access_System_Registers and that is not granted by PCC.perms. Notes - Writing NULL to a special capability register cannot be done with C0 as that only performs a read. An alternative implementation would allocate a separate two-operand CSpecialR instruction and interpret cs1 being C0 as a write of NULL if the need to use a temporary capability register proves to be overly problematic for software. - MEPCC and MTCC are validated and legalized on write. Any invalid write will cause the tag to be cleared which might result in a tag violation on instruction fetch following MRET or exception.
ct.cspecialrw cd, scr, cs1
| 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 000000 | 1 | scr | cs1 | 000 | cd | 1 | 0 | 11 | 0 | 11 | |||||||||||||||||||||
| Variable | Bits | Width |
|---|---|---|
scr | [24:20] | 5 |
cs1 | [19:15] | 5 |
cd | [11:7] | 5 |
No execution pseudocode is available for this instruction.
Xcheriot
| S | U |
|---|---|
| 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.