RISC-V pause Pseudo-Instruction Details
Assembler pseudo-instructionPAUSE hint pseudo-instruction, listed in the official assembly manual as fence w, 0. It is used in spin-wait loops to give implementations an opportunity to reduce resource contention or power.
What This Pseudo Instruction Is Saving You From Writing
Busy-wait loops do not always need a real memory barrier; pause expresses “I am waiting” with a standard hint encoding so hardware or simulators may optimize handling.
Official Semantics Checklist
Availability And Extension Conditions
- Zihintpause hint semantics
- Encoded as FENCE w,0
- The target environment accepts the PAUSE hint spelling
- Not a general synchronization primitive; use suitable fence/AMO/aq/rl operations when ordering is required.
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 pause a real RISC-V instruction?
pause 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 pause?
pause is a hint; it does not guarantee sleep, CPU yield, or a fixed delay