csrc
RISC-V csrc Pseudo-Instruction Details
Assembler pseudo-instructioncsrc expands to csrrc x0, csr, rs. CSRRC clears writable CSR bits selected by rs and writes the old value to x0.
What You Write
csrc csr, rs
Typical Real Expansion
csrrc x0, csr, rs
What This Pseudo Instruction Is Saving You From Writing
A CSRRC spelling with rd fixed to x0.
How To Read The Expansion
Step 1
csrrc x0, csr, rs
Step 2
CSRRC uses rs as the clear-bit mask for writable CSR bits.
Assembly Forms And Real Instructions
The expansion above identifies the CSRRC ISA semantics that apply.
Official References And Reading Order
This page treats pseudo-instructions as assembler-level aliases or macros: first read what real instructions they expand to, then use the official ISA manual for the behavior of those real instructions. ABI, relocation, and linker-relaxation details follow the psABI document.
Pitfalls / Common Confusions
rd=x0 discards the old value, but CSRRC still reads the selected CSR.
With rs=x0, CSRRC does not write the CSR; a non-x0 register holding zero is not the same condition.
FAQ
What is the official csrc expansion?
csrrc x0, csr, rs