code wiki / _hdl_build / nx_codegen_diff_gate.nx

nx_codegen_diff_gate.nx

buildroot/runtime/_hdl_build/nx_codegen_diff_gate.nx

2559 B50 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic codegen
docsdependenciesstructsconstsfunctions

about

nx_codegen_diff_gate.nx -- DIFFERENTIAL codegen verifier: the safety gate that lets the Nishi team improve register allocation (nx_x86_regalloc) WITHOUT a g1 repeat. Compiles a corpus of self-verifying programs with TWO compilers (the pinned known-good and a candidate), links + runs both, asserts IDENTICAL runtime behaviour. A correct codegen change emits different asm but the SAME result; a g1-style high-pressure miscompile DIVERGES and is CAUGHT before promotion. Build pipeline = nx_codegen_exec (shared). Known answer: all agree -> exit 0.

dependencies 1 imports · 0 importers

nx_codegen_exec.nx nx_codegen_diff_gate.nx

imports: nx_codegen_exec.nx

imported by: nobody (leaf or entry point)

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

main gd_puts sys_write gd_build_run gd_build sys_mmap gd_exec sys_mmap ↻ sys_fork sys_openat_wr sys_dup3 sys_close sys_execve sys_exit sys_wait4 wait_exit_code gd_run sys_mmap ↻ gd_exec ↻ gd_emit gd_puts ↻ sys_mmap ↻ sys_write ↻

structs

none

consts

none

functions

11func main() -> i64