x86-64-v2
SSE3 から SSE4.2 まで、POPCNT、CMPXCHG16B、LAHF/SAHF を追加します。Intel は 2008 年の Nehalem で、AMD は 2011 年の Bulldozer で初めてこのレベルに達しました。
x86-64-v2 は、x86-64 の登場後の数年間に加わった SIMD と整数の追加機能、すなわち SSE3、SSSE3、SSE4.1、SSE4.2、POPCNT によるポピュレーションカウント、16 バイトの比較交換 (compare-and-exchange)、64 ビットモードでの LAHF/SAHF をまとめたものです。
| 機能 | 提供するもの | 列挙方法 | Linux のフラグ | 例 |
|---|---|---|---|---|
| CMPXCHG16B | 16-byte compare-and-exchange, used for lock-free algorithms. | CPUID.01H:ECX[13] | cx16 | cmpxchg16b |
| LAHF-SAHF | LAHF and SAHF in 64-bit mode. | CPUID.80000001H:ECX[0] | lahf_lm | lahf |
| POPCNT | Population count (number of set bits). | CPUID.01H:ECX[23] | popcnt | popcnt |
| SSE3 | SSE3, shown as pni ("Prescott New Instructions") by Linux. | CPUID.01H:ECX[0] | pni | addsubpd |
| SSE4.1 | SSE4.1 blends, rounding, dot products and more. | CPUID.01H:ECX[19] | sse4_1 | blendpd |
| SSE4.2 | SSE4.2 string comparison and CRC32. | CPUID.01H:ECX[20] | sse4_2 | pcmpestri |
| SSSE3 | Supplemental SSE3, including byte shuffles. | CPUID.01H:ECX[9] | ssse3 | phaddd |
ソフトウェアにもたらすもの
SSE4.2 は高速な文字列比較 (PCMPESTRI と関連命令) と CRC32 命令を追加し、POPCNT は 1 命令でビットを数え、CMPXCHG16B はポインターとカウンターの組に対するロックフリーなアルゴリズムを可能にします。-march=x86-64-v2 を指定すると、コンパイラーは実行時のチェックなしにこれらすべてを使います。
このレベルのプロセッサー
- Intel Core (client)
- Nehalem (2008), Westmere (2010), Sandy Bridge (2011), Ivy Bridge (2012)
- Intel Atom and E-cores
- Silvermont (2013), Airmont (2015), Goldmont (2016), Goldmont Plus (2017), Tremont (2020)
- AMD (high performance)
- Bulldozer (2011), Piledriver (2012), Steamroller (2014)
- AMD (low power)
- Jaguar (2013), Puma (2014)
- Zhaoxin
- LuJiaZui (2018)
よく使われた 2 つのファミリが、わずかに届きません。Intel の Core 2 (Merom、Penryn) には SSE4.2 と POPCNT がなく、AMD の K10 (Phenom、Athlon II) には SSSE3 と SSE4.1 がないため、どちらもベースラインのプロセッサーです。
このレベルを必要とするもの
| 名前 | 最小 | 時期 | 注記 | 確認日 |
|---|---|---|---|---|
| .NET ランタイム | x86-64-v2 | .NET 11 (2026) | Older x86-64 processors fail with “The current CPU is missing one or more of the following instruction sets: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT”. ReadyToRun code in .NET 11 targets x86-64-v3 on Windows and Linux and falls back to the JIT on older processors. 出典 1, 出典 2 | |
| Red Hat Enterprise Linux 9 オペレーティングシステム | x86-64-v2 | 9.0 (2022) | 出典 | |
| SUSE Linux Enterprise Server 16 オペレーティングシステム | x86-64-v2 | 16.0 (2025) | The release notes add that QEMU guests need -cpu host (or another model with x86-64-v2 features) to boot. 出典 | |
| Windows 11 オペレーティングシステム | x86-64-v2 | 24H2 (2024) | Microsoft states that Windows 11 requires the x86-64-v2 instructions. Starting with version 24H2, Windows uses SSE4.2 and POPCNT and does not boot on processors without them. 出典 1, 出典 2 | |
| openSUSE Leap 16 オペレーティングシステム | x86-64-v2 | 16.0 (2025) | 出典 |
すべての最小要件を参照してください。
このレベル向けのビルド
gcc -march=x86-64-v2 ... # GCC 11+, Clang 12+
GOAMD64=v2 go build ... # Go 1.18+
RUSTFLAGS="-C target-cpu=x86-64-v2" cargo build ...
この方法でビルドした共有ライブラリは、ライブラリパスの glibc-hwcaps/x86-64-v2 サブディレクトリにインストールできます。glibc 2.33 以降は、このレベルをサポートするプロセッサーでだけそれらを読み込みます。