Extensions
Forms
1 (1 Legacy)
Data
Intel XED v2026.08.23

FUCOMIP is FUCOMI followed by a pop. It compares ST(0) with ST(i), sets ZF, PF and CF, raises the invalid-operation exception only for a signaling NaN or an unsupported encoding, and then marks ST(0) empty and increments TOP. The flag pattern is on FCOMI’s page and the quiet compare on FUCOMI’s; this page is about the pop. The encoding is DF E8+i, against FUCOMI’s DB E8+i.

The compare compilers emit

For long double, Clang 23 at -O2 compiles every comparison to FUCOMIP, and GCC 14 the equality tests and the quiet macros such as isless. Both operands arrive by FLD, so the pop fits: fucomip st, st(1) consumes the value loaded last, and fstp st(0) drops the other, leaving the stack as it was. Clang’s assembly output spells the mnemonic fucompi; GNU as 2.44 accepts both spellings and encodes either as DF E9 for ST(1).

When it pops

  • Exceptions masked: always. Zen 5 popped after a stack underflow too (an empty ST(i): IE, SF, C1 = 0, the flags unordered), and after a denormal operand, which raises DE and compares as its value.
  • IE unmasked: for an SNaN or an empty register, Zen 5 left TOP and the tags alone, still set ZF, PF and CF to unordered, and #MF came at the next waiting instruction. A handler that returns finds ST(0) still on the stack, so code that unmasks IE cannot count on the pop. The Operation section treats an unmasked DE for a denormal the same way.
  • fucomip st, st(0) compares ST(0) with itself and pops it: ZF for a number, all three flags for a NaN; Zen 5’s case with -2.5 set ZF.

C1 follows AMD’s manual: Zen 5 kept a C1 of 1 through an ordinary compare and cleared it only for the stack fault, where Intel’s manual clears it always.

The P6 family brought FUCOMIP with FCOMI and the other new compares; the CMOV bit of CPUID reports it, together with FPU. AMD’s Zen 5 guide lists FUCOMIP, like FUCOMI, as two macro-ops.

Forms

Every encoding of FUCOMIP that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
FUCOMIP ST(0), st(i) FUCOMIP_ST0_X87DF E8+iCMOV + FPU

Operation

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

if empty(src1) or empty(src2):
    underflow()
    x = 3                            # unordered
else:
    x = ucomi(src1, src2)            # only an SNaN raises IE
zf = x in (2, 3)                     # set with IE or DE unmasked too
pf = x == 3
cf = x in (1, 3)
of = sf = af = 0                     # C0 to C3 are kept, C1 but after
                                     # a stack fault
pop()                                # not with IE or DE unmasked

Run on AMD Zen 5 (EPYC 9645): 11 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
FUCOMIP ST(0), st(i)
ST(0)explicitread
st(i)explicitread
x87 register stackimplicitpop
x87 status wordimplicitwrite
RFLAGSimplicitwrite

Flags

M modified, 0 cleared; blank: not affected. How to read.
OFSFZFAFPFCFC1
All forms
00M0MMM

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
FCOMI

CMOV + FPU
CPUID.01H:EDX[15] CMOV
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. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-327 (FCOMI/FCOMIP/FUCOMI/FUCOMIP)
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  5. 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
  6. Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP

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 text is our own.