nap
Nap
Enters Nap power-saving mode (Supervisor only).
Details
Enters Nap power-saving mode, providing deeper power savings than Doze with longer wake-up latency. This is a privileged instruction that suspends instruction execution and transitions the processor to a lower-power state. Wake-up occurs on external interrupts or exceptions. No status registers are modified.
Pseudocode Operation
if MSR[PR] = 1 then raise Privileged Instruction Exception
enter Nap mode
Programming Note
The nap instruction is useful for reducing power consumption when a thread has no immediate work to do. It places the thread into a low-power state, but it must be used carefully as it does not execute instructions and can lead to performance degradation if overused. Ensure that interrupts are enabled before using nap to allow the system to wake up properly.