3-707
INSTRUCTION SET REFERENCE
WAIT/FWAITWait
Description
These instructions cause the processor to check for and handle pending, unmasked, floating-
point exceptions before proceeding. (FWAIT is an alternate mnemonic for the WAIT).
This instruction is useful for synchronizing exceptions in critical sections of code. Coding a
WAIT instruction after a floating-point instruction insures that any unmasked floating-point
exceptions the instruction may raise are handled before the processor can modify the instruc-
tions results. Refer to Section 7.9., Floating-Point Exception Synchronization in Chapter 7,
Floating-Point Unit of the Intel Architecture Software Developers Manual, Volume 1, for more
information on using the WAIT/FWAIT instruction.
Operation
CheckForPendingUnmaskedFloatingPointExceptions;
FPU Flags Affected
The C0, C1, C2, and C3 flags are undefined.
Floating-Point Exceptions
None.
Protected Mode Exceptions
#NM
MP and TS in CR0 is set.
Real-Address Mode Exceptions
#NM
MP and TS in CR0 is set.
Virtual-8086 Mode Exceptions
#NM
MP and TS in CR0 is set.
Opcode
Instruction
Description
9B
WAIT
Check pending unmasked floating-point exceptions.
9B
FWAIT
Check pending unmasked floating-point exceptions.