riscv / riscv-fast-interrupt

Proposal for a RISC-V Core-Local Interrupt Controller (CLIC)
https://jira.riscv.org/browse/RVG-63
Creative Commons Attribution 4.0 International
245 stars 49 forks source link

Ambiguous description for non-CSRRW variants of xscratchcsw and xscratchcswl description. #279

Closed Silabs-ArjanB closed 2 years ago

Silabs-ArjanB commented 2 years ago

The CLIC spec contains the following line related to xscratchcsw that is a bit ambiguous:

The behavior of the non-CSRRW variants (when either rd or rs1 is x0 or when rs1 is an immediate operand) on xscratchcsw is implementation-defined.

I read the "when either rd or rs1 is x0 or when rs1 is an immediate operand" part as explanation of what is meant with non-CSRRW variants. However, if interepreting it like that, then CSRRS/C with rs1 != x0 would be excluded from the definition. Is that intentional?

If not, then a clearer definition could be:

The behavior of the non-CSRRW variants (i.e. CSRRS/C, CSRRWI, CSRRS/CI) and CSRRW variants with rd = x0 on xscratchcsw are implementation-defined.

A similar ambiguous description is present for the xscratchcswl description.