wait
Wait for Interrupt
wait WC
wait
Stops instruction execution and places the processor in a lower power state until an interrupt occurs.
Details
The wait instruction causes instruction fetching and execution to be suspended under certain conditions, depending on the values of the WC and PL fields. Instruction fetching and execution are resumed when the events specified by the WC field occur or in the rare case of an implementation-dependent event.
Pseudocode Operation
Programming Note
['Because the waiting begins when the instruction completes, if the waiting is ended by an exception that causes a change of control flow (interrupt, event-based branch), the SPR that is set to reflect the point in the instruction stream at which the change of control flow occurred (e.g., SRR0 for Decrementer interrupt) will contain the EA of the instruction following the wait instruction.', 'Bits 6 and 7 of the wait instruction may be used in some implementations for an implementation-dependent field. Unless the intention is to use the implementation-dependent field, these bits must be coded zero.', 'wait serves as both a basic and an extended mnemonic. The Assembler will recognize a wait mnemonic with two operands as the basic form and a wait mnemonic with one operand or with no operand as an extended form. In the extended form with one operand the PL operand is omitted and assumed to be 0. In the extended form with no operand the WC and PL operands are omitted and assumed to be 0.', 'The wait instruction frees computational resources which might be allocated to another program or converted into power savings.']
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| waitrsv | |
| pause_short |
Example
Encoding
Operands
-
WC
Wait Condition (0=Interrupt, 1=Resume) -
PL
Programmable Length Field