wait
Wait
Wait for FPU (same as FWAIT).
Pseudocode Operation
while (FPU_busy_flag == 1) {
stall();
}
Encoding
Operands
Related
More in Base
Reference
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| 9B | WAIT | ZO | Valid Valid | Check pending unmasked floating-point exceptions. | |
| 9B | FWAIT | ZO | Valid Valid | Check pending unmasked floating-point exceptions. |
Description
Causes the processor to check for and handle pending, unmasked, floating-point exceptions before proceeding. (FWAIT is an alternate mnemonic for WAIT.) This instruction is useful for synchronizing exceptions in critical sections of code. Coding a WAIT instruction after a floating-point instruction ensures that any unmasked floating-point exceptions the instruction may raise are handled before the processor can modify the instruction’s results. See the section titled “Floating-Point Exception Synchronization” in Chapter 8 of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, for more information on using the WAIT/FWAIT instruction. This instruction’s operation is the same in non-64-bit modes and 64-bit mode.
Operation
CheckForPendingUnmaskedFloatingPointExceptions;