GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
common, x86

Darwin queries kernel for AVX512 support.

Darwin's CPU information now queries the kernel for AVX512 availability due to lazy state enabling.

GCC’s common x86 configuration on Darwin now queries the kernel for AVX512 support, as the operating system enables this state lazily. Reading XCR0 directly is unreliable in this context because the state may not be initialized when needed by constructors. This change ensures accurate detection of AVX512 capabilities.

In Details

The darwin_get_kernel_bool function is introduced in cpuinfo.h to query the kernel for boolean feature availability. The get_available_features function is updated to use this new helper, specifically for determining AVX512 availability on Darwin, bypassing the unreliable XCR0 check due to lazy state management.

For Context
AVX512
Advanced Vector Extensions 512, a set of SIMD instructions for x86 processors that operate on 512-bit vectors.
Darwin
The operating system XNU kernel and core system frameworks used by Apple macOS, iOS, iPadOS, tvOS, and watchOS.
XCR0
Extended Control Register 0, an x86 register used to control the processor's feature set, including the availability of AVX and AVX512 registers.
constructor
A special member function in C++ that is automatically called when an object of a class is created, used for initializing the object's state.
Filed Under: x86DarwinAVX512CPU detection