csrw

RISC-V csrw Pseudo-Instruction Details

Assembler pseudo-instruction

csrw expands to csrrw x0, csr, rs. rd=x0 does not read the CSR.

What You Write
csrw csr, rs
Typical Real Expansion
csrrw x0, csr, rs

What This Pseudo Instruction Is Saving You From Writing

An assembler spelling that fixes CSRRW rd to x0.

How To Read The Expansion

Step 1
csrrw x0, csr, rs

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.

FAQ

What is the official expansion of csrw?

csrw csr, rs expands to csrrw x0, csr, rs.