You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug:
The Nutshell implementation allows reading and writing to the WPRI (Write Preserve, Read Ignore) bit of the mstatus register, which seems to contradict the general guidance of the RISC-V specification. Specifically, writes to the WPRI bit are preserved, and reads reflect the written value, instead of being ignored or read as zero in Nutshell.
To Reproduce
Write a value to the mstatus register that modifies the WPRI bit (e.g., 4-bit).
Read the mstatus register value into a general-purpose register (e.g., t0).
Observe that the WPRI bit's value is preserved and not ignored as expected.
Expected behavior
According to the RISC-V spec, WPRI bits are reserved and should not affect operational semantics. Writes to these bits should be preserved internally but ignored upon reading, typically yielding a zero for these bits. The observed behavior where WPRI bits can be read and written as normal register bits might not align with the intention of future compatibility and specification adherence.
Screenshots
For writing to the fourth bit, the WPRI (Write Preserve, Read Ignore) bit, NutShell allows writing.
After writing the value, it is discovered upon reading that this value can be fully retrieved.
Describe the bug:
The Nutshell implementation allows reading and writing to the WPRI (Write Preserve, Read Ignore) bit of the
mstatus
register, which seems to contradict the general guidance of the RISC-V specification. Specifically, writes to the WPRI bit are preserved, and reads reflect the written value, instead of being ignored or read as zero in Nutshell.To Reproduce
mstatus
register that modifies the WPRI bit (e.g., 4-bit).mstatus
register value into a general-purpose register (e.g., t0).Expected behavior
According to the RISC-V spec, WPRI bits are reserved and should not affect operational semantics. Writes to these bits should be preserved internally but ignored upon reading, typically yielding a zero for these bits. The observed behavior where WPRI bits can be read and written as normal register bits might not align with the intention of future compatibility and specification adherence.
Screenshots
For writing to the fourth bit, the WPRI (Write Preserve, Read Ignore) bit, NutShell allows writing.
After writing the value, it is discovered upon reading that this value can be fully retrieved.
Environment (optional, if necessary):
OS: Ubuntu 22.04.3 LTS
Compiler: gcc 11.4.0
Additional context
None
The text was updated successfully, but these errors were encountered: