RISC-V fsflagsi Pseudo-Instruction Details
Assembler pseudo-instructionImmediate write-fflags pseudo-instruction, expanding to csrrwi rd, fflags, uimm or an x0 form that does not return the old value. It directly writes the floating-point exception flag field.
What This Pseudo Instruction Is Saving You From Writing
Floating-point state is accessed through CSR instructions; these pseudo-instructions name common fcsr/frm/fflags read and write forms for more readable floating-point environment code.
Official Semantics Checklist
Availability And Extension Conditions
- Requires the related floating-point state CSRs
- Accesses fflags/frm/fcsr through Zicsr instructions
- The target ISA/ABI environment supports the relevant floating-point extension and CSR access
- Writing frm, fflags, or fcsr can affect later floating-point results or exception flags.
How To Read The Expansion
What You May See In objdump / Disassembly
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
Pitfalls / Common Confusions
FAQ
Is fsflagsi a real RISC-V instruction?
fsflagsi is an assembler pseudo-instruction or alias, not a separate hardware opcode. The “Typical Real Expansion” section lists the official expansion, and behavior is defined by the expanded ISA instructions.
What is the main trap when using fsflagsi?
These pseudo-instructions require the implementation to support the related floating-point state; do not assume availability without the relevant extension