Skip to content

Instantly share code, notes, and snippets.

@CKingX
Last active February 18, 2025 18:23
Show Gist options
  • Select an option

  • Save CKingX/0d555071fa5555c4a982b20e8273077f to your computer and use it in GitHub Desktop.

Select an option

Save CKingX/0d555071fa5555c4a982b20e8273077f to your computer and use it in GitHub Desktop.
Windows 11 CPU instructions common to all supported CPUs

Supported Intel

  • Elkhart Lake
  • Tiger Lake
  • Kaby Lake R
  • Whiskey Lake
  • Comet Lake
  • Coffee Lake
  • Gemini Lake
  • Gemini Lake Refresh
  • Jasper Lake
  • Ice Lake
  • Amber Lake Y
  • Coffee Lake
  • Lakefield
  • Rocket Lake
  • Alder Lake
  • Kaby Lake G
  • Skylake
  • Kaby Lake
  • Cascade Lake
  • Amber Lake

AMD Codenames

  • Pallock
  • Dali
  • Picasso
  • Raven Ridge
  • Rome
  • Milan
  • Matisse
  • Pinnacle Ridge
  • Renoir
  • Lucienne

However, I never really finished going through AMD codenames as all cores are either Zen(+), Zen 2 or Zen 3, so I simplified on that.

So based on the overlap, it seems Gemini Lake (but without sha instructions) is the Common Denominator and this is actually better than x86-64-v2 (but if you target that, you are still fully compatible, just that you don't use all of the instructions that are common to all supported Windows 11 computers. These are the supported features common to all supported Windows 11 CPUs:

target_feature="aes"
target_feature="cmpxchg16b"
target_feature="fxsr"
target_feature="lahfsahf"
target_feature="movbe"
target_feature="pclmulqdq"
target_feature="popcnt"
target_feature="rdrand"
target_feature="rdseed"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="sse4.1"
target_feature="sse4.2"
target_feature="ssse3"
target_feature="xsave"
target_feature="xsavec"
target_feature="xsaveopt"
target_feature="xsaves"

Sadly, AVX and AVX2 support is not common to all Windows 11 CPUs due to Atom chips and segmentation in the Pentium and Celeron lineup until Tiger Lake. So you need to use it behind feature test or not use it at all if you just want portable SIMD code

@CKingX
Copy link
Author

CKingX commented May 28, 2022

This is x86-64-v2 (in LLVM) for context (equivalent to Nehalem features):

target_feature="cmpxchg16b"
target_feature="fxsr"
target_feature="lahfsahf"
target_feature="popcnt"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="sse4.1"
target_feature="sse4.2"
target_feature="ssse3"

So the current common denominator of supported CPUs have more instructions supported than V2 but missing many that are in V3 (V3 is close to Haswell but V3 is missing some that are in Goldmont-plus as well). But SSE 4.2 and SSSE3 can now be fully used if Windows 11 is the minimum requirement (and Windows 11 can be compiled to use these instructions throughout)

@CKingX
Copy link
Author

CKingX commented May 28, 2022

x86-64-v3 (close to Haswell) for comparison:

target_feature="avx"
target_feature="avx2"
target_feature="bmi1"
target_feature="bmi2"
target_feature="cmpxchg16b"
target_feature="f16c" 
target_feature="fma"
target_feature="fxsr"
target_feature="lahfsahf"
target_feature="lzcnt"
target_feature="movbe"
target_feature="popcnt"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="sse4.1"
target_feature="sse4.2"
target_feature="ssse3"
target_feature="xsave"

@CKingX
Copy link
Author

CKingX commented Feb 25, 2024

Just an update, the compiler at the time didn't show cmpxchg16b, movbe, and sahf/lahf for the processors. Since cmpxchg16b and sahf/lahf were already requirements for windows 10, all the processors support them and it is in x86-64-v2 onwards. As for movbe, this is in x86-64-v3 onwards as well as in all processors that support Windows 11.

@CKingX
Copy link
Author

CKingX commented Apr 19, 2024

Turns out Windows 11 supported CPUs also includes Goldmont Plus (including the Gemini Lake). Although I listed Gemini Lake, I said the common denominator is Tremont without SHA instructions, rather than Goldmont Plus

@CKingX
Copy link
Author

CKingX commented Feb 18, 2025

Microsoft is ensuring new OEM machines have a cut down list of supported processors for Windows 11 24H2. Note that this means that Windows still supports these processors and you can upgrade to 24H2 from older Windows 11 builds just fine or even install a new copy of Windows 11. Just that, OEM companies (HP, Dell, etc) can't sell new machines with these processors with Windows 11 24H2. As such, this is for reference only, and you should support older processors listed above. Instead, this can provide some speculation the minimum processors that Windows 12 could require (though it may require the same processors as Windows 11 as well. Right now this is all just speculation)

These CPU generations are removed for Intel:

  • Elkhart Lake
  • Kaby Lake R
  • Whiskey Lake
  • Comet Lake
  • Coffee Lake (Refresh)
  • Gemini Lake
  • Gemini Lake Refresh
  • Ice Lake
  • Amber Lake Y
  • Lakefield
  • Kaby Lake G
  • Skylake
  • Kaby Lake
  • Cascade Lake
  • Amber Lake

This leaves quite a few oddities. First, Ice Lake is removed but not Rocket Lake (which is based on Sunny Cove being backported to 14 nm as Cypress Cove). Elkhart Lake is removed but not Jasper Lake (both based on Tremont and as such, no AVX2 sadly). This isn't even a cut-off based on launch Elkhart Lake and Jasper Lake both launched in 2021.

This leaves these CPUs supported from launch to 24h2 for OEMs:

  • Tiger Lake
  • Jasper Lake
  • Rocket Lake
  • Alder Lake

For AMD, all generations of Zen are still supported (I just checked on Zen versions like Zen(+), Zen 2, etc rather than individual product names such as Picasso)

As such, the only change is that the SHA instruction is now supported in all 24H2 OEM machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment