x86-64 microarchitecture levels, CPUs and how to check them
x86-64.net is an independent reference for the x86-64 architecture. It starts with the x86-64 microarchitecture levels: what x86-64-v2, v3 and v4 require, which processors meet them, and how to check a machine.
| Level | Adds | First Intel | First AMD |
|---|---|---|---|
| x86-64-v1 | CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SCE, SSE, SSE2 | NetBurst (Prescott, Nocona) (2004) | K8 (Hammer) (2003) |
| x86-64-v2 | CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3 | Nehalem (2008) | Bulldozer (2011) |
| x86-64-v3 | AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE | Haswell (2013) | Excavator (2015) |
| x86-64-v4 | AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL | Skylake-SP (2017) | Zen 4 (2022) |
Instruction reference
Every form of the x86 instructions, from the general-purpose base to the newest extensions, with encodings, CPUID bits and the processors that have them, generated from Intel XED.
ABIs and calling conventions
Which registers carry the arguments, how big a long is, and which platforms share an ABI, with the compiled code of real compilers as evidence.
Calling conventions
- System V x86-64The calling convention of Linux, the BSDs and macOS: registers, structs, the stack and varargs.
- Microsoft x64The calling convention of Windows and UEFI: four register slots, shadow space and structs by reference.
- System V i386The 32-bit convention of Linux and the BSDs: every argument on the stack, results in EAX, EDX or ST0.
- Windows x86cdecl, stdcall, fastcall, thiscall and vectorcall: registers, stack cleanup and name decoration.
- Calling conventions comparedArgument, return and callee-saved registers of all four ABIs, side by side.
- Vector extensions and the ABIs__m256 and __m512 arguments, VZEROUPPER, AVX-512 masks, APX's new registers and AMX tiles.
Stacks, threads, system calls and C++
- Stack framesFrame pointers, alignment at calls, the red zone, shadow space and stack probes.
- Unwinding and exceptionsCall frame information in .eh_frame, Windows x64 unwind codes, SEH chains and shadow stacks.
- Thread-local storageFS and GS, the Windows TEB, and the ELF TLS models with TLS descriptors.
- System callsSYSCALL and INT 0x80 on Linux, x32, FreeBSD and macOS, and why Windows has no stable numbers.
- Linux system call tablesEvery system call of x86-64, x32 and i386: its number, entry point and argument registers.
- C++ ABIsItanium and Microsoft: this, name mangling, vtables, member function pointers and exceptions.
Check a Linux machine
With glibc 2.33 or later, the dynamic loader tells you. The highest level marked supported is the machine's level.
$ /lib64/ld-linux-x86-64.so.2 --help | grep supported
x86-64-v3 (supported, searched)
x86-64-v2 (supported, searched)
More ways to check, including Windows, macOS and from C
A program stops with Fatal glibc error: CPU does not support x86-64-v2 or Illegal instruction? What these error messages mean and how to fix them