Extensions
Mnemonics
FXRSTOR, FXRSTOR64
Forms
2 (2 Legacy)
Data
Intel XED v2026.08.23

FXRSTOR loads the x87, MMX and SSE state back from the 512-byte area that FXSAVE writes, whose page describes the layout; FXRSTOR64 (REX.W) reads the x87 pointers as 64-bit offsets instead of 32-bit offsets with selectors. In 64-bit mode it loads XMM0 to XMM15 and MXCSR. Bytes 464 to 511 are left to software and ignored.

Faults

  • Alignment: the area must be aligned to 16 bytes. Zen 5 raised #GP for an address aligned only to 8.
  • MXCSR: a bit set that MXCSR_MASK does not allow is #GP. Zen 5’s mask is 0002FFFFH: an image with bit 16 set faulted, and the mask allows bit 17, AMD’s mask for the misaligned-access exception, which no case loaded. Intel’s manual calls every bit from 16 up reserved.

Neither fault loaded anything on Zen 5.

What it does not check

FXRSTOR is not a waiting instruction, and it loads the status word as it is, a pending exception included: Zen 5 loaded an image with IE flagged and unmasked, and the #MF came at the next waiting instruction, not at FXRSTOR. Intel’s manual suggests an FWAIT after FXRSTOR to raise such exceptions at a known point. MXCSR works the other way: a flag loaded with its exception unmasked raises nothing until that exception happens again, as both manuals say.

The tag word in the area has one bit per register, set when it is not empty, and FXRSTOR works out the full tags from the contents, as FRSTOR does.

The pointers: AMD’s manual and Zen 5

AMD’s manual says that FXRSTOR loads the last instruction and data pointers and the opcode only when ES, worked out from the loaded flags and masks, is set, matching its FXSAVE, which stores them only then. Zen 5 loaded them regardless: from an image with ES clear, the opcode 123H and the data pointer were in place for the FNSAVE that followed, in both forms (the probe does not record the instruction pointer). Intel’s manual has them loaded every time.

From C, _fxrstor(p) and _fxrstor64(p) need -mfxsr; GCC 14 and Clang 23 at -O2 emit one FXRSTOR or FXRSTOR64. XRSTOR reads the same 512 bytes as the start of its area, followed by the state that came after SSE. AMD’s Zen 5 guide lists FXRSTOR as microcoded.

Forms

Every encoding of FXRSTOR that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
FXRSTOR m512byte FXRSTOR_MEMmfpxenvNP 0F AE /1FXSAVE
FXRSTOR64 m512byte FXRSTOR64_MEMmfpxenvREX.W 0F AE /1FXSAVE + LM

Operation

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

FXRSTOR m512byte
a = mem.address
if a % 16:
    fault(GP, 0)
m = load(a + 24, 32)
if m & ~mxcsr_mask:                  # a bit MXCSR lacks
    fault(GP, 0)
sw = load(a + 2, 16)
t = sw >> 11 & 7                     # TOP from the area
for i in range(8):                   # ST(i) from that TOP
    v = load(a + 32 + 16 * i, 80)
    st[(t - top + i) % 8] = v
tags = load(a + 4, 8)
tw = 0
for j in range(8):                   # Rj empty where its bit is
    if not tags >> j & 1:            # clear; the others valid,
        tw |= 3 << 2 * j             # zero or special by what
ftw = tw                             # they hold
fcw = load(a, 16)
fsw = sw                             # an exception pending too
fop = load(a + 6, 16)                # 11 bits
fip = load(a + 8, 32)                # 32-bit offsets
fcs = load(a + 12, 16)
fdp = load(a + 16, 32)
fds = load(a + 20, 16)
mxcsr = m
for i in range(16):
    xmm[i] = load(a + 160 + 16 * i, 128)

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

FXRSTOR64 m512byte
a = mem.address
if a % 16:
    fault(GP, 0)
m = load(a + 24, 32)
if m & ~mxcsr_mask:                  # a bit MXCSR lacks
    fault(GP, 0)
sw = load(a + 2, 16)
t = sw >> 11 & 7                     # TOP from the area
for i in range(8):                   # ST(i) from that TOP
    v = load(a + 32 + 16 * i, 80)
    st[(t - top + i) % 8] = v
tags = load(a + 4, 8)
tw = 0
for j in range(8):                   # Rj empty where its bit is
    if not tags >> j & 1:            # clear; the others valid,
        tw |= 3 << 2 * j             # zero or special by what
ftw = tw                             # they hold
fcw = load(a, 16)
fsw = sw                             # an exception pending too
fop = load(a + 6, 16)                # 11 bits
fip = load(a + 8, 64)                # 64-bit offsets
fdp = load(a + 16, 64)
mxcsr = m
for i in range(16):
    xmm[i] = load(a + 160 + 16 * i, 128)

Run on AMD Zen 5 (EPYC 9645): 2 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
FXRSTOR m512byte FXRSTOR64 m512byte
m512byteexplicitread
x87 control wordimplicitwrite

Flags

None: XED records no flag that the forms test or change.

Attributes

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

All forms
aligned memory operand; may abort a TSX transaction

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to FXRSTOR, each with the form it compiles to and the Clang options it needs. The forms come from compiling every intrinsic and decoding the result with Intel XED; all intrinsics A–Z explains the method.

IntrinsicCompiles to
_fxrstor void _fxrstor(void *__p)

FXRSTOR m512byte Legacy -mfxsr

_fxrstor64 void _fxrstor64(void *__p)

FXRSTOR64 m512byte Legacy -mfxsr

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
FXSAVE

FXSAVE
CPUID.01H:EDX[24] FXSAVE

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

FXSAVE + LM
CPUID.01H:EDX[24] FXSAVE
CPUID.80000001H:EDX[29] LM

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

More FXSR 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. Clang's x86 intrinsic headers, LLVM 23.1.2 (commit 85ac56026243): the intrinsics, their signatures and doc comments, and the Clang of that release, which compiled each of them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-409 (FXRSTOR)
  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
  7. 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 intrinsics and their signatures come from Clang, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.