Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CSRRWI instruction behavior according to RISC-V spec
Refer to RISC-V Unprivileged ISA Version 20191213 9.1 CSR Instructions ---------------------------------------------------------------------- | 31 20|19 15|14 12|11 7|6 0| | csr | rs1 | funct3 | rd | opcode | | source/dest | uimm[4:0] | CSRRWI | dest | SYSTEM | ---------------------------------------------------------------------- CSRRWI behavior likes below and it needs to work atomically x[rd] = CSRs[csr]; CSRs[csr] = uimm The uimm is equal to rs1's index, instead of rs1's register value Close sysprog21#7
- Loading branch information