Does atomic here mean a memory atomic?
No. In Zicsr, atomic means the CSR read and write are performed by one CSR instruction, not an AMO to a memory address.
Read the old CSR value into rd and atomically clear CSR bits selected by rs1; rs1=x0 suppresses the CSR write
CSRRC is the Zicsr atomic CSR read-and-clear instruction: it reads the old CSR value, zero-extends it to XLEN for rd, then uses 1 bits in rs1 as a mask to clear corresponding writable CSR bits. If rs1=x0, it does not write the CSR and causes no CSR write side effects; it still reads the CSR.
Shows the Zicsr CSR read-modify-write flow: decode the SYSTEM encoding, read the CSR, compute write/set/clear semantics, then update rd and the CSR.
Assume the CSR is implemented and access is permitted; ordinary writable bits follow the mask. rs1=x0 is always zero; zero in non-x0 still attempts a write. Read-only CSR write attempts show an exception.
The CSR name/address is part of the instruction syntax; the old CSR value and rs1 example value are execution context. The example calculation treats displayed bits as writable; a concrete CSR's writable bits, readback value, and field side effects follow that CSR's specification.
CSRRC is a Zicsr I-type SYSTEM instruction; the CSR address occupies bits 31..20.
The bit view shows the CSR value computation at the selected XLEN.
This animation shows only Zicsr ISA-visible CSR reads/writes, side-effect suppression, and bit-mask semantics; it does not model concrete CSR field meanings, trap handlers, pipelines, or timing.
CSRRC reads the old CSR value and uses 1 bits in rs1 as a clear mask. With rs1=x0 it still reads the CSR, but does not write it.
Assume implemented, accessible custom CSR 0x7c0 with ordinary writable example bits, old value=0xf and x6=5: csrrc x5,0x7c0,x6 gives x5=0xf and CSR=0xa.
Assume implemented, accessible custom CSR 0x7c0 with ordinary writable example bits, old value=0xf and x6=5: csrrc x5,0x7c0,x6 gives x5=0xf and CSR=0xa.
No. In Zicsr, atomic means the CSR read and write are performed by one CSR instruction, not an AMO to a memory address.
No. rd=x0 suppresses the CSR read only for CSRRW/CSRRWI; rs1=x0 or uimm=0 suppresses the CSR write only for CSRRS/CSRRC and their immediate forms.