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

A NOP takes up bytes and does nothing else. Compiled code is full of them, almost never executed: they pad the space before a function or a loop that the compiler aligns to 16 bytes, and they reserve bytes that a tool may patch later. The single byte 90 does for one byte; for longer gaps, the multi-byte form 0F 1F /0 takes a ModRM operand whose addressing bytes make the length, and it neither reads nor writes memory, by Intel’s manual.

Long NOPs

AMD’s Zen 5 guide advises fewer, longer NOPs rather than many short ones, since every NOP still passes through decode and retirement. Intel’s manual and optimization manual list sequences from 2 to 9 bytes (66 90, 0F 1F 00, up to 66 0F 1F 84 00 00 00 00 00), and AMD’s Zen 5 guide continues to 15 bytes by adding 66 prefixes, while warning that only the first of Zen 5’s four decoders takes instructions longer than 10 bytes. The assemblers our builds used fill longer gaps with a CS-prefixed form: GCC’s (GNU as) wrote 66 66 2E 0F 1F 84 00 ..., Clang’s added up to five 66 prefixes.

For patching, -fpatchable-function-entry=5 reserves 5 bytes at each function’s start: GCC 14 emits five 90s, Clang 23 one 5-byte NOP, 0F 1F 44 00 08.

90 is a true NOP

90 was once XCHG EAX, EAX. In 64-bit mode that would clear bits 63:32 of RAX, so both vendors make plain 90 a real no-operation, as Zen 5 recorded; with REX.B it is still an exchange: 41 90 is XCHG R8D, EAX, which on Zen 5 cleared bits 63:32 of both (49 90 is XCHG R8, RAX). The ModRM form XCHG EAX, EAX (87 C0) does clear the upper half. F3 90 is PAUSE.

Hint space

0F 18 to 0F 1F are reserved NOPs that new features take over: the prefetches (0F 18), MPX’s bound instructions (0F 1A, 0F 1B), CLDEMOTE (0F 1C /0) and CET’s ENDBR64 (F3 0F 1E FA). Code that uses them runs unchanged, as NOPs, on processors without the feature. XED also decodes 0F 0D with a register operand as a NOP, but Zen 5 raised #UD for it: 0F 0D is AMD’s PREFETCH group, which takes memory.

By Intel’s optimization manual, only the one-byte NOP is specially handled, and a multi-byte NOP’s register operands count as inputs, so a NOP can wait for the instruction that last wrote them.

In the optimization guide

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

Front end

  • Code alignment and padding: Padding that runs is not free: a NOP uses no execution unit but still passes through decode and the retire queue, so a few long NOPs cost less than many short ones, and only a very long stretch of padding is better jumped over.
  • Code alignment and padding: How long a NOP may be depends on the core: up to 15 bytes, made by adding 66h prefixes to the 8-byte form, on Zen 3 to Zen 5 (Zen 5), while AMD’s Family 15h slows down with more than three 66h prefixes, so code for every AMD processor stops at 11 bytes.
  • Code alignment and padding: Zen 4 fuses a NOP with the instruction next to it, or two NOPs together, which makes padding that runs cheaper there; Zen 5 fuses no NOPs.

Bulldozer to Excavator

  • Front end: An instruction with more than three prefixes decodes over ten times slower, so padding is best made of long NOPs (0F 1F) with at most three 66h prefixes, 11 bytes each at most, as LLVM pads for these cores.

Crestmont and Gracemont

  • Front end: LLVM pads code for these cores with NOPs of up to 15 bytes, which it expects them to decode quickly; its Tremont tuning does not.

Jaguar and Puma

  • Front end: Unlike some older AMD cores, such as the Bulldozer family, Jaguar decodes a NOP with more than three 66h prefixes at full speed, so padding is best a run of 15-byte NOPs and then a shorter one, as LLVM pads for it.

Sandy Bridge and Ivy Bridge

  • What Ivy Bridge changed: Sandy Bridge decodes the multi-byte NOP (0F 1F) only on the first of its four decoders, while a NOP padded with 66H prefixes decodes on any of them; Ivy Bridge removes that limit, decoding either form on all four at up to four a cycle.

Silvermont to Goldmont Plus

  • Front end: Goldmont drops NOPs before the reservation stations; LLVM pads Silvermont code with NOPs of up to 7 bytes.

Tremont

  • Front end: LLVM pads code for Tremont with NOPs of up to 10 bytes, its default when a processor’s tuning names no other length; it uses 7 for Silvermont and 15 for the later E-cores.

Zen and Zen+

  • Front end: Padding costs least as a few long NOPs: Zen decodes NOPs of up to 15 bytes, the 8-byte form with 66h prefixes in front, without a penalty, while code that may also run on Family 15h processors should stop at 11 bytes.

Zen 2

  • Front end: Padding is cheapest in a few long NOPs: Zen 2 decodes a NOP of up to 15 bytes, the 8-byte form with 66h prefixes added, without a penalty, while code that also runs on Family 15h processors stops at 11 bytes.

Zen 3

  • Front end: Padding is cheapest in a few long NOPs: Zen 3 decodes a NOP of up to 15 bytes, the 8-byte form with 66h prefixes added, without a penalty, while code that also runs on earlier AMD processors such as Family 15h stops at 11 bytes.

Zen 4

  • Front end: Padding is cheapest in a few long NOPs: Zen 4 decodes a NOP of up to 15 bytes, the 8-byte form with 66h prefixes added, without a penalty, while code that also runs on earlier AMD processors such as Family 15h stops at 11 bytes.
  • Front end: A NOP and the integer instruction next to it, or two NOPs, fuse into one macro-op when together at most 15 bytes long, so padding costs less than on earlier cores. sources differ

Zen 5

  • Front end: For padding, fewer and longer NOPs are better than many short ones.

Forms

Every encoding of NOP that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
NOP r16/32/64 NOP_GPRv_0F18r00F 18 /0Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r10F 18 /1Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r20F 18 /2Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r30F 18 /3Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r40F 18 /4Base instruction set
NOP m16/32/64 NOP_MEMv_0F18r50F 18 /5Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r50F 18 /5Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r60F 18 /6Base instruction set
NOP r16/32/64 NOP_GPRv_0F18r70F 18 /7Base instruction set
NOP m16/32/64 NOP_MEMv_0F18r40F 18 /4 (without MOVRS)Base instruction set
NOP m16/32/64 NOP_MEMv_0F18r60F 18 /6 (without PREFETCHI)Base instruction set
NOP m16/32/64 NOP_MEMv_0F18r70F 18 /7 (without PREFETCHI)Base instruction set
NOP m16/32/64, r16/32/64 NOP_MEMv_GPRv_0F190F 19 /rBase instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F190F 19 /rBase instruction set
NOP m16/32/64, r16/32/64 NOP_MEMv_GPRv_0F1D0F 1D /rBase instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F1D0F 1D /rBase instruction set
NOP m16/32/64 NOP_MEMv_0F1F0F 1F /rBase instruction set
NOP r16/32/64 NOP_GPRv_0F1F0F 1F /rBase instruction set
NOP NOP_9090Base instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F0D0F 0D /r3DNowPrefetch
NOP m16/32/64, r16/32/64 NOP_MEMv_GPRv_0F1CF2 0F 1C /0
66 0F 1C /0
66 0F 1C /r
F3 0F 1C /0
F2 0F 1C /r
F3 0F 1C /r
NP 0F 1C /r
NP 0F 1C /0 (without CLDEMOTE)
Base instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F1C0F 1C /rBase instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F1ANP 0F 1A /r
0F 1A /r (without MPX)
Base instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F1BNP 0F 1B /r
F3 0F 1B /r
0F 1B /r (without MPX)
Base instruction set
NOP r16/32/64, m16/32/64 NOP_GPRv_MEMv_0F1A0F 1A /r (without MPX)Base instruction set
NOP r16/32/64, m16/32/64 NOP_GPRv_MEM_0F1B0F 1B /r (without MPX)Base instruction set
NOP m16/32/64, r16/32/64 NOP_MEMv_GPRv_0F1E0F 1E /rBase instruction set
NOP r16/32/64, r16/32/64 NOP_GPRv_GPRv_0F1ENP 0F 1E /r
66 0F 1E /r
F2 0F 1E /r
F3 0F 1E /0
F3 0F 1E /2
F3 0F 1E /3
F3 0F 1E /4
F3 0F 1E /5
F3 0F 1E F9
F3 0F 1E FD
F3 0F 1E FE
F3 0F 1E FF
F3 0F 1E /6
F3 0F 1E FC
F3 0F 1E F8
F3 0F 1E FA (without CET)
F3 0F 1E FB (without CET)
F3 0F 1E /1 (without CET)
F3 REX.W 0F 1E /1 (without CET)
F3 REX.W 0F 1E F8 (without IBHF)
Base instruction set

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.
Modelm16
m32
m64
r16
r32
r64
NOP
Sandy Bridge, Haswell, Broadwell, Zen, Zen 21 / 0.251 / 0.25
Skylake, Skylake-SP, Ice Lake1 / 0.171 / 0.17
Alder Lake, Sapphire Rapids, Lunar Lake1 / 01 / 0
Bonnell1 / 0.5p11 / 0.5p01
Silvermont1 / 0.51 / 0.5
Piledriver1 / 1EX0 EX11 / 1EX0 EX1
Zen 3, Zen 40 / 0.25ALU0 ALU1 ALU2 ALU30 / 0.25ALU0 ALU1 ALU2 ALU3
Jaguar1 / 0.5ALU0 ALU11 / 0.5ALU0 ALU1

Operation

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

NOP
pass                         # nothing changes: 90 is not XCHG EAX, EAX,
                             # which would clear bits 63:32 of RAX

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

NOP r/m16/32/64
pass                         # no register, flag or memory changes
# 0F 1F /0 is the documented multi-byte NOP. 0F 18 is hint space:
# on processors with PREFETCHRST2 and PREFETCHI, /4, /6 and /7 in
# memory are those prefetches

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

NOP r/m16/32/64, r16/32/64 NOP r16/32/64, r/m16/32/64
pass                         # no register, flag or memory changes
# 0F 19 to 0F 1E are hint space: on a processor with MPX, CLDEMOTE
# or CET enabled, some of these encodings are those instructions
# instead

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

NOP r16/32/64, r16/32/64
fault(UD)                    # 0F 0D is PREFETCH and PREFETCHW: with a
                             # register operand, #UD (APM Volume 3,
                             # PREFETCH, rev. 3.36; Zen 5). XED
                             # decodes a NOP; Intel's manual
                             # gives 0F 0D with memory only

Run on AMD Zen 5 (EPYC 9645): 6 cases. Every one raised an exception, at CPL 3, where the probe runs.

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
NOP r/m16/32/64
r/m16/32/64explicitread
NOP r/m16/32/64, r16/32/64
r/m16/32/64explicitread
r16/32/64explicitread
NOP
No operands in XED
NOP r16/32/64, r/m16/32/64
r16/32/64explicitread
r/m16/32/64explicitread

Flags

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

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
FAT_NOP

No CPUID bit: part of the base instruction set.

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

No CPUID bit: part of the base instruction set.

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

3DNowPrefetch
CPUID.80000001H:ECX[8] 3DNowPrefetch

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

No CPUID bit: part of the base instruction set.

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

More General-purpose instructions

All 109 General-purpose instructions

More PREFETCHW 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. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-160 (NOP)
  5. AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
  6. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  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 timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.