image/svg+xmlFINIT/FNINIT—Initialize Floating-Point UnitDescriptionSets the FPU control, status, tag, instruction pointer, and data pointer registers to their default states. The FPU control word is set to 037FH (round to nearest, all exceptions masked, 64-bit precision). The status word is cleared (no exception flags set, TOP is set to 0). The data registers in the register stack are left unchanged, but they are all tagged as empty (11B). Both the instruction and data pointers are cleared.The FINIT instruction checks for and handles any pending unmasked floating-point exceptions before performing the initialization; the FNINIT instruction does not.The assembler issues two instructions for the FINIT instruction (an FWAIT instruction followed by an FNINIT instruction), and the processor executes each of these instructions in separately. If an exception is generated for either of these instructions, the save EIP points to the instruction that caused the exception.This instruction’s operation is the same in non-64-bit modes and 64-bit mode.IA-32 Architecture CompatibilityWhen operating a Pentium or Intel486 processor in MS-DOS compatibility mode, it is possible (under unusual circumstances) for an FNINIT instruction to be interrupted prior to being executed to handle a pending FPU excep-tion. See the section titled “No-Wait FPU Instructions Can Get FPU Interrupt in Window” in Appendix D of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, for a description of these circumstances. An FNINIT instruction cannot be interrupted in this way on later Intel processors, except for the Intel QuarkTM X1000 processor.In the Intel387 math coprocessor, the FINIT/FNINIT instruction does not clear the instruction and data pointers.This instruction affects only the x87 FPU. It does not affect the XMM and MXCSR registers.OperationFPUControlWord := 037FH;FPUStatusWord := 0;FPUTagWord := FFFFH;FPUDataPointer := 0;FPUInstructionPointer := 0;FPULastInstructionOpcode := 0;FPU Flags AffectedC0, C1, C2, C3 set to 0.Floating-Point ExceptionsNoneOpcodeInstruction64-Bit ModeCompat/Leg ModeDescription9B DB E3FINITValidValidInitialize FPU after checking for pending unmasked floating-point exceptions.DB E3FNINIT*ValidValidInitialize FPU without checking for pending unmasked floating-point exceptions.NOTES:*See IA-32 Architecture Compatibility section below.

image/svg+xmlProtected Mode Exceptions#NMCR0.EM[bit 2] or CR0.TS[bit 3] = 1.#MF If there is a pending x87 FPU exception.#UD If the LOCK prefix is used.Real-Address Mode ExceptionsSame exceptions as in protected mode.Virtual-8086 Mode ExceptionsSame exceptions as in protected mode.Compatibility Mode ExceptionsSame exceptions as in protected mode.64-Bit Mode ExceptionsSame exceptions as in protected mode.

This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.