System
XSAVE
The XSAVE feature set saves and restores processor state in numbered components that bitmaps select, so one mechanism covers x87, SSE, AVX, AVX-512, AMX and the state that later extensions add.
- CPUID
- XSAVE + OSXSAVE
CPUID.01H:ECX[26]CPUID.01H:ECX[27] - Instructions
- 4 mnemonics
- Processors
- Sandy Bridge, Ivy Bridge, Haswell, Broadwell, Skylake, Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Goldmont, Goldmont Plus, Tremont, Snow Ridge, Lakefield, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill, Bulldozer, Piledriver, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6
- Linux flag
xsave
Every extension that adds registers adds state that an operating system must save on a context switch. The XSAVE feature set handles all of it with one mechanism: the state is divided into numbered components, and a 64-bit bitmap selects which ones an instruction saves or restores. Intel’s manual defines components 0 to 18:
| Components | State |
|---|---|
| 0, 1 | x87 and SSE (XMM registers, MXCSR) |
| 2 | AVX: the upper halves of YMM0 to YMM15 |
| 3, 4 | MPX bound registers and configuration |
| 5 to 7 | AVX-512: mask registers, upper halves of ZMM0 to ZMM15, ZMM16 to ZMM31 |
| 9 | PKRU, the protection-key rights |
| 17, 18 | AMX: tile configuration and 8 KB of tile data |
| 8, 10 to 16 | Supervisor state, such as Processor Trace and CET |
APX adds component 19 for R16 to R31.
The operating system enables user components in XCR0 with XSETBV and sets CR4.OSXSAVE, which CPUID reports back as OSXSAVE; programs read XCR0 with XGETBV before they use AVX, so that registers the kernel does not save are never touched. XSAVE and XRSTOR save and restore the components that both XCR0 and EDX:EAX select. Supervisor components need XSAVES; XSAVEOPT and XSAVEC save less.
The size of the area depends on the processor and on XCR0, so CPUID leaf 0DH reports it. On Linux the signal frame contains an XSAVE area too, which is why AMX’s tile data is enabled per process on request: see how the ABIs treat vector state.
Instructions
| Mnemonic | Summary | Forms |
|---|---|---|
| XGETBV | Reads the extended control register that ECX selects into EDX:EAX; XCR0 says which state components the OS lets XSAVE manage. | 1 |
| XRSTOR | Restores the state components that XCR0 and EDX:EAX select from an XSAVE area, setting those the area marks unused to their initial state. | 2 |
| XSAVE | Saves the state components that XCR0 and EDX:EAX select, such as the x87, SSE and AVX registers, to a 64-byte aligned XSAVE area. | 2 |
| XSETBV | Writes EDX:EAX to the extended control register that ECX selects, such as XCR0, which enables AVX and other XSAVE state; ring 0 only. | 1 |
CPUID and processors
XED splits XSAVE into 1 ISA set. Software can use a form when the processor reports every CPUID bit of one alternative of the form's ISA set.
| ISA set | CPUID | Processors |
|---|---|---|
XSAVE | XSAVE + OSXSAVE | Sandy Bridge, Ivy Bridge, Haswell, Broadwell, Skylake, Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Goldmont, Goldmont Plus, Tremont, Snow Ridge, Lakefield, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill, Bulldozer, Piledriver, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6 |
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, 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. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- Linux kernel documentation: Using XSTATE features in user space applications
- Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 7.0 (July 2025)
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.