Home/Instructions/Pause Hint
PAUSE

RISC-V PAUSE Instruction Details

Instruction ManualI-type

Zihintpause bounded pause hint indicating the current hart retirement rate may be temporarily reduced or paused.

Instruction Syntax

pause

RV32/RV64 Zihintpause 2.0; pause has no explicit register or immediate operands.

32-bit FENCE form: fm=0000, pred=0001 (W), succ=0000, rs1=rd=x0, funct3=000, opcode=0001111; encoding 0x0100000F.

The pause effect must be bounded and may be zero. Empty succ mandates no memory ordering; fixed delay or scheduling effects are not guaranteed.

Portable spin-wait loops should use one PAUSE before rechecking conditions; using it in an LR/SC sequence voids the forward-progress guarantee.

ZihintpauseMicroarch Hints

Instruction Behavior

PAUSE is a HINT defined by Zihintpause and encoded as a FENCE form with pred=W, succ=0, fm=0, rd=x0, and rs1=x0. It indicates that the current hart may be in a spin-wait sequence and that the instruction retirement rate may be temporarily reduced or paused; the effect duration must be bounded and may be zero. Because the successor set is empty, PAUSE mandates no memory ordering.

PAUSE Decode And Hint Animation

Shows fixed FENCE-form fields and the bounded pause hint; empty succ mandates no memory ordering.

no explicit operands
pausepause
Execution Contextcurrent-hart spin-wait hintbounded hint, may be zero
31..28
27..24
23..20
19..15
14..12
11..7
6..0
0000
fm
0001
pred
0000
succ
00000
rs1=x0
000
funct3
00000
rd=x0
0001111
MISC-MEM
instruction
0x0100000F
opcode
0001111 -> MISC-MEM/FENCE
fm
0000
pred
0001 -> W
succ
0000 -> empty
reserved
rs1=x0, rd=x0, funct3=000
ordering
spin-wait hint; empty succ set mandates no memory ordering
complete
Awaiting hint completion

This animation shows only FENCE/PAUSE architectural semantics defined by the RISC-V unprivileged ISA; it does not represent processor-specific pause duration, cache behavior, interconnect protocol, or execution cost.

Quick Understanding & Search Notes

PAUSE is a FENCE-form spin-wait hint. It may let an implementation reduce or pause the current hart retirement rate for a bounded duration, but succ=0 means it mandates no memory ordering.

PAUSE is encoded as a FENCE form with fm=0, pred=W, succ=0, rs1=x0, and rd=x0.
The empty successor set means PAUSE mandates no memory ordering.
The pause effect must be bounded, and the duration may be zero.
PAUSE is for spin-wait loops, not a synchronization primitive or fixed-delay instruction.

Common Usage Scenarios

Atomic & Sync

Understand this scenario with real code like «pause # hint for spinlock busy-wait loop».

Concurrency & Multi-core

Understand this scenario with real code like «pause # hint for spinlock busy-wait loop».

Power Optimization

Understand this scenario with real code like «pause # hint for spinlock busy-wait loop».

Pre-Use Checklist

Syntax Check
  • RV32/RV64 Zihintpause 2.0; pause has no explicit register or immediate operands.
  • 32-bit FENCE form: fm=0000, pred=0001 (W), succ=0000, rs1=rd=x0, funct3=000, opcode=0001111; encoding 0x0100000F.
Semantic Check
  • The pause effect must be bounded and may be zero. Empty succ mandates no memory ordering; fixed delay or scheduling effects are not guaranteed.
  • Portable spin-wait loops should use one PAUSE before rechecking conditions; using it in an LR/SC sequence voids the forward-progress guarantee.

Pitfalls / Common Confusions

PAUSE is a performance/energy hint and does not guarantee a specific pause duration, power-saving effect, or scheduling effect.
PAUSE provides no memory ordering; it cannot replace FENCE, atomics, or lock protocols.
The official recommendation for portable spin-wait loops is generally to use one PAUSE before re-evaluating the loop condition.
Like other FENCE instructions, PAUSE cannot be used inside LR/SC sequences without voiding the forward-progress guarantee.

FAQ

Does PAUSE guarantee a fixed delay?

No. The official rule only requires the effect to be bounded, and the duration may be zero.

Can PAUSE replace FENCE?

No. PAUSE has an empty successor set and mandates no memory ordering.

Is PAUSE just a NOP?

It is a HINT; an implementation may reduce or pause the current hart retirement rate, but the duration may also be zero.