code wiki / (root) / nx_cpu_features.nx

nx_cpu_features.nx

buildroot/runtime/nx_cpu_features.nx

785 B22 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_cpu_features.nx -- sovereign x86-64 CPU feature detection via cpuid. The BMI2/ADX gate for G3 Phase-2 maax (MULX needs BMI2, ADCX/ADOX need ADX) and for any future feature-gated codegen. cpuid(7,0):EBX holds the structured extended-feature flags: bit 8 = BMI2, bit 19 = ADX. The EBX value is returned zero-extended (positive < 2^32), so >> is unambiguous.

dependencies 0 imports · 1 importers

nx_cpu_features.nx nx_cpu_features_test.nx

imports: none

imported by: nx_cpu_features_test.nx

structs

none

consts

none

functions

7func nx_cpu_has_bmi2() -> i64
12func nx_cpu_has_adx() -> i64
18func nx_cpu_has_adx_mulx() -> i64