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

FISTTP is FISTP with C’s rounding built in: it converts ST(0) to a signed 16-, 32- or 64-bit integer by dropping the fraction, whatever the control word’s RC says, stores it and pops. Zen 5 stored -2 for -2.5 with RC set to nearest, and 2147483647 for 2147483647.5 with RC set to up. It came with SSE3, not with the x87, and needs that CPUID bit (leaf 1, ECX bit 0); there is no form that keeps ST(0).

Why it exists

Before it, a C cast from long double to an integer had to switch RC to toward zero with FLDCW and back around a FISTP. With -msse3, or -march=x86-64-v2 and up, GCC 14 and Clang 23 at -O2 compile (long)x to fld and fisttp QWORD PTR, (int)x and (short)x to the 32- and 16-bit forms, with no control-word traffic. In 32-bit code, where SSE2 has no 64-bit conversion, (long long)d on a double goes through the x87 the same way: GCC loads d with FLD, Clang copies it through an XMM register first, and both store it with FISTTP.

The edges

Truncation widens the range by almost one: a value fits when its integer part does. Zen 5 stored 80000000H for -2147483648.5 with only PE, and 7FFFH for 32767.5, while 2147483648.0 and -32769.0 gave the integer indefinite (the most negative value of the size) with IE, as did a QNaN. A value between -1 and +1 gives 0; for a denormal, Zen 5 raised PE, not DE.

With IE unmasked, an invalid value leaves memory and the stack alone. With PE unmasked, Zen 5 stored the truncated value and popped, and the #MF came at the next waiting instruction. C1 is cleared.

Cost

AMD’s Zen 5 guide lists FISTTP, like FISTP, as two macro-ops; the FLDCW pair it replaces is microcoded. For float and double in 64-bit code, compilers use SSE’s CVTTSD2SI and CVTTSS2SI instead, which truncate the same way without the x87 stack.

Forms

Every encoding of FISTTP that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
FISTTP m32int FISTTP_MEMmem32int_ST0DB /1SSE3
FISTTP m64int FISTTP_MEMm64int_ST0DD /1SSE3
FISTTP m16int FISTTP_MEMmem16int_ST0DF /1SSE3

Operation

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

if empty(st0):
    underflow()
    v = INDEFINITE
else:
    v = st0
r = cvtt_int(v, dest.bits)           # toward zero, whatever RC says; a
                                     # NaN, an infinity, an unsupported
                                     # encoding or a number out of range
                                     # gives the integer indefinite,
                                     # with IE; a denormal raises PE,
                                     # not DE
dest.write(r)
pop()
c0 = c2 = c3 = UNDEFINED

Run on AMD Zen 5 (EPYC 9645): 19 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
FISTTP m16int FISTTP m32int FISTTP m64int
m16/32/64intexplicitwrite
x87 register stackimplicitpop
x87 status wordimplicitwrite

Flags

M modified, U undefined; blank: not affected. How to read.
C0C1C2C3
All forms
UMUU

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
SSE3X87

SSE3
CPUID.01H:ECX[0] SSE3

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

More SSE3 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-350 (FISTTP)
  4. 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
  5. 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.