code wiki / _hdl_build / nx_selfix_test.nx
nx_selfix_test.nx
buildroot/runtime/_hdl_build/nx_selfix_test.nx
about
nx_selfix_test.nx -- the team SELF-FIXES across EVERY constant. It self-selects its
strategy (shift-add chain for cheap constants, the imul it diagnosed it lacked for the
ones the chain can't reach), emits the choice, VERIFIES it 1:1 by execution, costs it, and
races the best of {gcc, clang} by COST. The point: the chain generator's GAPS are now
closed by the team itself -- it diagnosed the missing op last loop and wields it this loop.
Gate: every constant handled + verified by execution -> exit 0.
dependencies 3 imports · 0 importers
imports: nx_selfix.nxnx_engineer_crash.nxnx_gcc_race.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 12 | func sf_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 13 | func sf_num(v: i64) -> i64 |
| 22 | func tally(r: *i64, n: i64) -> i64 { var ec: i64 = 0; var i: i64 = 0; while i < n { if r[i] != 1 { if ec == 0 { ec = i + 1 } } i = i + 1 } return ec } called by 1: main |
| 23 | func sf_write(path: *u8, buf: *u8, len: i64) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd < 0 { return 0 - 1 } sys_write(fd, buf, len); sys_close(fd); return 0 } |
| 24 | func sf_build_c(c: i64, path: *u8) -> i64 |
| 36 | func sf_min(a: i64, b: i64) -> i64 { if b > 0 { if b < a { return b } } return a } called by 1: sf_one |
| 39 | func sf_one(c: i64, gccpath: *u8, res: *i64) -> i64 |
| 62 | func sf_run(ks: *i64, nk: i64, gccpath: *u8, mat: *i64, r: *i64) -> i64 |
| 74 | func sf_report(ks: *i64, nk: i64, mat: *i64) -> i64 |
| 91 | func sf_main(r: *i64) -> i64 |
| 103 | func main() -> i64 |