Extensions
Mnemonics
FNINIT, FINIT
Forms
1 (1 Legacy)
Data
Intel XED v2026.08.23

FNINIT puts the x87 unit in its initial state:

  • the control word becomes 037FH: every exception masked, 64 bits of precision, rounding to nearest (see FLDCW);
  • the status word becomes 0: no exception flags, C0 to C3 clear, TOP 0;
  • every register is tagged empty;
  • the last instruction pointer, data pointer and opcode are cleared, which the 80387 did not do, Intel’s manual notes.

The XMM registers and MXCSR stay as they were. FINIT, listed on this page, is FWAIT followed by FNINIT.

The registers keep their bits

FNINIT only marks the registers empty; it does not zero them, as AMD’s manual says. On Zen 5, an FNSAVE right after it still stored the eight old values, now numbered from TOP 0. An x87 instruction cannot read them any more, since an empty register is a stack underflow, but they are not erased. Initializing the x87 state through XRSTOR, with its bit clear in XSTATE_BV, does zero them, besides setting the same control and status words.

No wait

The N means that FNINIT does not first check for a pending unmasked exception. With ES set in the status word, Zen 5 ran it without #MF, and the exception was gone: FNINIT clears the flags that would have raised it. FINIT’s FWAIT would deliver that #MF first. So FNINIT is the way to reset the unit when its state is unknown or broken, for example in an exception handler that will not resume the faulting code.

In practice

C has no way to ask for FNINIT short of inline assembly, and compiled code does not need it. A function that leaves values on the stack, or MMX code without EMMS, makes later x87 loads overflow, and FNINIT is the blunt repair, which discards the control word too. FNCLEX clears only the exception flags, FFREE empties one register, and FLDENV or FRSTOR load a saved state.

Forms

Every encoding of FNINIT that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
FNINIT FNINITDB E3FPU

Latency and throughput

What the scheduling models of LLVM 23.1.2 give for each form, not measurements: latency / reciprocal throughput in cycles, the ports under them. A row is a model, or models that agree; a dash, a form that its processors lack. Memory forms: latency from the address, ports without the load and store units. Which processors each model covers.
ModelFNINIT
Sandy Bridge5 / 1.33p015
Haswell, Broadwell, Skylake, Skylake-SP, Ice Lake, Alder Lake, Sapphire Rapids75 / 6p0156
Lunar Lake75 / 3V0 V1 V2 V3 p1 p3 p5
Bonnell63 / 31.5p01
Silvermont100 / 1FPC0
Piledriver100 / 0.5EX0 EX1
Zen, Zen 2100 / 0.25
Zen 3, Zen 4100 / 25ALU0 ALU1 ALU2 ALU3
Jaguar100 / 0.5ALU0 ALU1

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

fcw = 0x037F                         # every exception masked, 64 bits,
                                     # to nearest
fsw = 0                              # TOP 0, no flags, C0-C3 0
ftw = 0xFFFF                         # every register empty; their values
                                     # stay

Run on AMD Zen 5 (EPYC 9645): 5 cases.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
FNINIT
x87 control wordimplicitwrite
x87 tag wordimplicitwrite
x87 status wordimplicitwrite

Flags

M modified; blank: not affected. How to read.
C0C1C2C3
All forms
MMMM

Attributes

What else XED records about the forms. How to read.

All forms
may abort a TSX transaction

CPUID and processors

Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
X87

FPU
CPUID.01H:EDX[0] FPU

Every x86-64 processor in XED’s model and Zen 3 to Zen 6

More x87 instructions

All 90 x87 instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-345 (FINIT/FNINIT)
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  6. AMD64 Architecture Programmer's Manual, Volume 5: 64-Bit Media and x87 Floating-Point Instructions (26569, rev. 3.16, November 2021), Wayback Machine copy of AMD's PDF

The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.