code wiki / _hdl_build / nx_dc_core.nx

nx_dc_core.nx

buildroot/runtime/_hdl_build/nx_dc_core.nx

7212 B192 linesdepth 3pulls 3 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_dc_core.nx -- DUAL-LANE COMPARE CORE (mainless; R1-T1-002). One corpus program through BOTH toolchains, exit codes compared: lane A = the CURRENT sovereign chain via the durable runner (_offc/nx_sov_build_run.elf <name>; retry guard included) lane B = the KNOWN-GOOD frozen compiler (_offc/nx_cc_known_good.elf, benchmark/oracle use only per law) + the same nxasm + run AGREE = same rc. DISAGREE = a finding (one lane computes wrong values -- the context-sensitive miscompile class this instrument exists to catch): the source is COPIED to runtime/_hdl_build/_dgbug<idx>.nx (lane-buildable by basename = ready-made T2 fix-corpus rows) + a DIFFBUG row. Lane rc 3/4 (compile/asm fail) compares like any rc: both-fail-alike = AGREE (consistent refusal), one-fails = DISAGREE (a divergence finding). Findings are SUCCESS (exit 0 + rows); only unwritable logs are infra RED. Per-idx scratch paths (/tmp/_dcb<idx>.s/.elf): same program = same bytes, so rewrites are stale-tail-safe by determinism (LM-022 discipline). license_tier: ORIGINAL

dependencies 2 imports · 4 importers

nx_syscalls.nx nx_itoa_lib.nx nx_dc_core.nx _dcb_probe.nx _diff_seed_gate_authored.nx _nxasm_ctx_probe.nx nx_diff_cmp.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: _dcb_probe.nx_diff_seed_gate_authored.nx_nxasm_ctx_probe.nxnx_diff_cmp.nx

structs

none

consts

20const K_MAGIC_4096: i64 = 4096
21const K_MAGIC_8192: i64 = 8192

functions

23func dc_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 4: mainmaindc_onemain calls 1: sys_write
28func dc_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 5: mainmainmaindc_onemain calls 1: nxi_fd
30func dc_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: dc_one
37func dc_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: dc_one calls 1: sys_mmap
52func dc_spawn(elf: *u8, a1: *u8, a2: *u8, rout: i64) -> i64
75func dc_filesize(path: *u8) -> i64
87func dc_lane_a(name: *u8) -> i64
called by 3: mainmaindc_one calls 1: dc_spawn
93func dc_lane_b(src: *u8, spath: *u8, elfpath: *u8) -> i64
112func dc_copy(src: *u8, dst: *u8) -> i64
134func dc_one(prefix: *u8, idx: i64, lfd: i64) -> i64