Open oolegoon opened 2 months ago
Good catch, I think this may be an oversight. Certainly reads of scountovf from VS/VU-mode should raise virtual-instruction exceptions. Writes should probably raise an illegal instruction exception, as normal. However, this spec is ratified, so let me check with ARC.
We are hoping to fix the spec, see https://lists.riscv.org/g/tech-privileged/message/2094.
Thanks for clarification!
According to the H extension of the Privileged ISA, write access to a read-only register from VS/VU mode causes an illegal instruction exception according to the rules of the HS-qualified instruction.
Ssccfg is based on Sscsrind, which states that this rule does not apply and exceptions on access are determined by the spec for which the window is used.
The Ssccfg spec says that access to scountovf generates a virtual instruction exception.
Could you please clarify: does both read and write access generate a virtual instruction exception?
On the one hand, the behavior is described quite clearly, on the other hand, the dualism in terms of different types of exceptions for writing to read-only from VS/VU-modes is a bit confusing.