diff options
author | Andrew Waterman <andrew@sifive.com> | 2020-07-27 14:25:26 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2020-07-27 14:25:26 -0700 |
commit | 8088ba478136a25e864a34c5467941c68f104509 (patch) | |
tree | 2fe953e01c418e22f067f77395708adda46a0f6d | |
parent | e4f6e44f5c560561b88b92cf4c01080fb6d7525d (diff) | |
download | riscv-isa-manual-8088ba478136a25e864a34c5467941c68f104509.zip riscv-isa-manual-8088ba478136a25e864a34c5467941c68f104509.tar.gz riscv-isa-manual-8088ba478136a25e864a34c5467941c68f104509.tar.bz2 |
Clarify effect on unwritten bits for CSRRS/CSRRC
They aren't _explicitly_ written, but that doesn't mean they are
unaffected, since they could change as a result of the bits that
are written.
Resolves #549
-rw-r--r-- | src/csr.tex | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/csr.tex b/src/csr.tex index b1b7336..a72553c 100644 --- a/src/csr.tex +++ b/src/csr.tex @@ -63,16 +63,15 @@ to integer register {\em rd}. The initial value in integer register {\em rs1} is treated as a bit mask that specifies bit positions to be set in the CSR. Any bit that is high in {\em rs1} will cause the corresponding bit to be set in the CSR, if that CSR bit is writable. -Other bits in the CSR are unaffected (though CSRs might have side -effects when written). +Other bits in the CSR are not explicitly written. The CSRRC (Atomic Read and Clear Bits in CSR) instruction reads the value of the CSR, zero-extends the value to XLEN bits, and writes it to integer register {\em rd}. The initial value in integer register {\em rs1} is treated as a bit mask that specifies bit positions to be cleared in the CSR. Any bit that is high in {\em rs1} will cause the -corresponding bit to be cleared in the CSR, if that CSR bit is -writable. Other bits in the CSR are unaffected. +corresponding bit to be cleared in the CSR, if that CSR bit is writable. +Other bits in the CSR are not explicitly written. For both CSRRS and CSRRC, if {\em rs1}={\tt x0}, then the instruction will not write to the CSR at all, and so shall not cause any of the |