code wiki / (root) / _nx_bits_fast_vs_soft.nx

_nx_bits_fast_vs_soft.nx

buildroot/runtime/_nx_bits_fast_vs_soft.nx

2781 B85 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic nx
docsdependenciesstructsconstsfunctions

about

_nx_bits_fast_vs_soft.nx Paired correctness oracle: for every input in a curated set, nx_bits_popcount64 (FAST, intrinsic dispatch) must agree with nx_bits_popcount64_soft (SWAR fallback). Same for clz32 / ctz32. Exit code = 0 on agreement; 1..N on first disagreement (encodes which case mismatched so the bench can decode). Closes the four-pillar PREVENT pillar: any future codegen drift between intrinsic and software fallback fires here.

dependencies 2 imports · 0 importers

syscalls.nx nx_bits.nx _nx_bits_fast_vs_soft.nx

imports: syscalls.nxnx_bits.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_bits_popcount64 nx_bits_popcount64_soft nx_bits_clz32 nx_bits_clz32_soft nx_bits_ctz32 nx_bits_ctz32_soft

structs

none

consts

none

functions

16func main() -> i64