Extensions
Forms
3 (2 Legacy, 1 EVEX)
Data
Intel XED v2026.08.23

MOVDIRI stores a general-purpose register of 32 or 64 bits to memory as a direct store: it writes around the caches with the write-combining protocol, whatever the memory type of the destination, and never merges with a later store to the same address. If the line is in a cache it is first written back, when modified, and invalidated. The destination must be memory; there is no register form and no 8- or 16-bit form. MOVDIR64B, whose page covers the shared semantics in more detail, does the same for a whole 64-byte line.

Small doorbells

A device that takes work from a ring of descriptors is told about new ones by a write of the ring’s tail to one of its registers, usually mapped uncacheable. Ordinary stores to such memory are strongly ordered, so later stores wait behind the slow write to the device; Intel’s optimization manual describes how that holds back the store buffer and why direct stores, being weakly ordered, avoid it (Section 3.12.1). The same weak ordering means the doorbell could overtake the descriptors written before it, so the manual has software put an SFENCE first. With -mmovdiri, GCC 14 and Clang 23 at -O2 compile _mm_sfence(); _directstoreu_u64(reg, v); to sfence and movdiri qword ptr [rdi], rsi.

Alignment

A destination aligned to its size arrives at the device in one undivided write; Intel’s manual guarantees nothing more for a misaligned one, which is split in two parts that may arrive in either order. No exception reports the misalignment, except #AC where alignment checking is on. Zen 5’s recorded cases, eight-byte stores to an address four bytes past alignment among them, wrote the value like an ordinary MOV, which is all a single thread can see.

Which processors

Intel’s manuals differ on its age: the optimization manual says Sapphire Rapids introduced the direct stores, while the SDM’s first volume names Tremont and Tiger Lake as having them too, and GCC 14 enables -mmovdiri for -march=tremont and -march=tigerlake. Of AMD’s processors the page lists Zen 5 and Zen 6, and GCC 14 enables it for znver5 but not znver4; AMD’s Zen 5 guide lists it as microcoded. APX adds an EVEX form for its new registers.

In the optimization guide

What the optimization guide says about MOVDIRI, a line per claim. Each links to the claim in the guide, with its sources and where they differ.

Golden Cove and Raptor Cove

  • Loads, stores and caches: Sapphire Rapids added MOVDIRI and MOVDIR64B, weakly ordered stores for ringing a device’s doorbell without stalling the stores behind them.

Tremont

Forms

Every encoding of MOVDIRI that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
MOVDIRI m32, r32 MOVDIRI_MEMu32_GPR32u32NP 0F 38 F9 /rMOVDIRI
MOVDIRI m64, r64 64-bit mode only MOVDIRI_MEMu64_GPR64u64REX.W 0F 38 F9 /rMOVDIRI
MOVDIRI m32/64, r32/64 MOVDIRI_MEMyu_GPRyu_APXEVEX.LLZ.NP.MAP4.SCALABLE F9 /rAPX_F + MOVDIRI

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.
Modelm32, r32m64, r64
Alder Lake, Sapphire Rapids511 / 0.5p4789514 / 0.5p4789
Lunar Lake100 / 0.5p10 p11 p25 p26 p27100 / 0.5p10 p11 p25 p26 p27

Operation

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

dest.write(src)                  # a direct store: around the caches, weakly
                                 # ordered; one write when dest is aligned to
                                 # its size, else two, in either order

Run on AMD Zen 5 (EPYC 9645): 10 cases. The APX forms were not run: none of these processors has APX.

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
MOVDIRI m32, r32 MOVDIRI m64, r64 64-bit mode only MOVDIRI m32/64, r32/64
m32/64explicitwrite
r32/64explicitread

Flags

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

Exceptions

The exception class is XED's name for the set of exception conditions that a form follows. How to read.

Legacy forms
none in XED
EVEX forms
APX-EVEX-INT

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to MOVDIRI, 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
_directstoreu_u32 void _directstoreu_u32(void *__dst, unsigned int __value)

MOVDIRI m32, r32 Legacy -mmovdiri

_directstoreu_u64 void _directstoreu_u64(void *__dst, unsigned long __value)

MOVDIRI m64, r64 Legacy -mmovdiri

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
MOVDIRI

MOVDIRI
CPUID.(EAX=07H,ECX=0):ECX[27] MOVDIRI

Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Snow Ridge, Sierra Forest, Clearwater Forest, Zen 5, Zen 6
APX_F_MOVDIRI

APX_F + MOVDIRI
CPUID.(EAX=07H,ECX=1):EDX[21] APX_F
CPUID.(EAX=07H,ECX=0):ECX[27] MOVDIRI

Nova Lake, Diamond Rapids

More APX instructions

All 88 APX 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. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-52 (MOVDIRI)
  6. Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)
  7. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  8. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  9. 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 and the timings from LLVM's scheduling models, both part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.