Capability register cd is set to the capability in register cs1 with its base field replaced with cs1.address and its length field replaced with a representable value no larger than the value in the integer register rs2. That length will be nonzero if rs2 is nonzero. Notes - As with CSetBounds, the implementation here does the bounds check on the requested bounds. This is less interesting here than there because the results of setCapBoundsRoundDown are always a subset of the requested range. - The present implementation returns the largest representable span from the given base (cs1.address) whose length is no more than rs2, except that it will not return anything larger than the largest capability representable with an exponent of 14. This caveat simplifies handling of very large capabilities, which we do not expect to be used with this instruction in practice. However, we may revisit this decision in future editions; software should depend only on the result being representable and of non-zero length (unless rs2 was zero).
ct.csetboundsrounddown cd, cs1, rs2
| 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 | 0 | 1 | 0 | rs2 | cs1 | 000 | cd | 1 | 0 | 11 | 0 | 11 | ||||||||||||||||||
| Variable | Bits | Width |
|---|---|---|
rs2 | [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.