frrm
RISC-V frrm Pseudo-Instruction Details
Assembler pseudo-instructionRISC-V frrm is an Assembly Manual v0.0.1 pseudo-instruction. It expands to csrrs rd, frm, x0; ISA Section 21.2 copies frm into rd's low three bits.
What You Write
frrm rd
Typical Real Expansion
csrrs rd, frm, x0
What This Pseudo Instruction Is Saving You From Writing
frrm rd reads the floating-point rounding mode frm.
Availability And Extension Conditions
Base Conditions
- Applies where the described fcsr and frm field are implemented.
How To Read The Expansion
Step 1
CSRRS reads frm; with rs1=x0, CSRRS does not write that CSR.
Assembly Forms And Real Instructions
This page records the official expansion only; the RISC-V Assembly Programmer's Manual lists these spellings as pseudoinstructions.
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.
When To Think Of It First
Use frrm rd to read frm.
Pitfalls / Common Confusions
FRRM copies frm into the low three bits of rd and zeros the other rd bits.
FAQ
Is frrm a separate hardware opcode?
No. the RISC-V Assembly Programmer's Manual lists frrm as an assembler pseudoinstruction; behavior comes from the listed CSR expansion.
What is the official frrm expansion?
the RISC-V Assembly Programmer's Manual lists: csrrs rd, frm, x0.