Instruction
PREFETCH
Loads the cache line of a byte in memory into the first-level data cache ahead of use; AMD lets reserved 0F 0D forms act the same.
- Extensions
- Forms
- 5 (5 Legacy)
- Data
- Intel XED v2026.08.23
PREFETCH (0F 0D /0) is AMD’s original prefetch, from 3DNow!: it asks for the cache line holding a byte to be brought into the L1 data cache, for reading. Like every prefetch it is a hint. It changes no register, flag or memory, a cache hit or an address that would fault makes it a NOP, and AMD’s manual lets a processor ignore it altogether or treat it differently. The line usually arrives in the exclusive state, where its sibling PREFETCHW asks for it modified, ready for a store.
The ModRM byte picks the kind
The reg field of the ModRM byte is not a register here: 000b is PREFETCH and 001b PREFETCHW, and AMD’s manual reserves the other six values but runs them as PREFETCH, so that software written for later kinds still runs. Intel later used /2 for PREFETCHWT1 on its Xeon Phi processors, and XED decodes /3 as PREFETCHW. A register operand (ModRM mod 11b) raises #UD.
The Zen 5 behind this site’s recorded cases ran /0 and /4 to /7, each at a mapped address, at an unmapped one near 0 and at a kernel address, 15 cases in all: none faulted, and none changed a register, a flag or memory. AMD’s Zen 5 guide lists PREFETCH as one macro-op.
Which processors have it
AMD’s manual offers three CPUID bits of leaf 80000001H, any one enough: 3DNowPrefetch in ECX bit 8, long mode in EDX bit 29 and 3DNow! in EDX bit 31. So every 64-bit AMD processor has it, including those without 3DNow!, such as Zen 5. Intel’s manual documents only /1, PREFETCHW, under bit 8, and /2 for the Xeon Phi; its opcode map names no /0. The prefetches that every x86-64 processor documents are the SSE forms PREFETCHT0 to PREFETCHNTA.
Compilers
For __builtin_prefetch(p) GCC 14 emits PREFETCH only for 32-bit
targets without SSE’s prefetches, such as -m32 -march=k6-2; with
-march=athlon, k8 or znver1 it emits PREFETCHT0, and so does its
_m_prefetch() from <mm3dnow.h>, with -m3dnow too. Clang 23 emits
PREFETCHT0 even for -march=k6-2.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
PREFETCH m8
PREFETCH_EXCLUSIVE_MEMmprefetch | 0F 0D /0 | 3DNowPrefetch |
PREFETCH m8
PREFETCH_RESERVED_0F0Dr4 | 0F 0D /4 | 3DNowPrefetch |
PREFETCH m8
PREFETCH_RESERVED_0F0Dr5 | 0F 0D /5 | 3DNowPrefetch |
PREFETCH m8
PREFETCH_RESERVED_0F0Dr6 | 0F 0D /6 | 3DNowPrefetch |
PREFETCH m8
PREFETCH_RESERVED_0F0Dr7 | 0F 0D /7 | 3DNowPrefetch |
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
pass # into the first-level data cache
# no fault for any address. 0F 0D /4 to /7, reserved, are PREFETCH
# too (AMD's manual), as is /2 on AMD's processors, which Intel's
# Xeon Phi took for PREFETCHWT1; with a register operand, #UDRun on AMD Zen 5 (EPYC 9645): 15 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
PREFETCH m8 | ||
m8 | explicit | read |
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
- memory operand only names cache lines
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.
| ISA set | CPUID | Processors |
|---|---|---|
PREFETCH_NOP | 3DNowPrefetch | Every x86-64 processor in XED’s model and Zen 3 to Zen 6 |
More PREFETCHW instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026)
- 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.