code wiki / _hdl_build / nx_portability_census.nx
nx_portability_census.nx
buildroot/runtime/_hdl_build/nx_portability_census.nx
about
nx_portability_census.nx -- the HARDWARE-ABSTRACTION-LAYER reach census (operator 2026-06-13:
"translate our work across all hardware as a layer while keeping S-class-exceed performance, as
foundation work").
AUTHOR=ORGAN, measured (no-wave): reads portability_targets.tsv (the ISAs Nishi should reach) and
COMPUTES PRESENT/ABSENT per target from REAL evidence -- does the codegen backend file actually
exist (= nxc2 can emit NATIVE code for that ISA)? -- via sys_openat_rd, NOT asserted. The bottom
HAL = these compile-time native backends (zero-cost portability: native per arch, no runtime VM).
Writes portability_census.tsv + an honest bm_verdict. Self-validating: pos control x86_64.c MUST
exist, neg control MUST NOT. Composes nx_benchmark (honest verdict, refuses cherry-pick).
The remaining foundation work (ABSENT targets + making the rv64-only kernel emitters ride these
backends) is the build-to-portability backlog. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_benchmark.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
| 15 | const KP_MAGIC_80000: i64 = 80000 |
| 16 | const KP_MAGIC_200000: i64 = 200000 |
| 18 | const KP_REF: *u8 = "knowledge/registry/portability_targets.tsv" |
| 19 | const KP_OUT: *u8 = "knowledge/registry/portability_census.tsv" |
| 20 | const KP_LOG: *u8 = "knowledge/status/portability_census.log" |
| 21 | const KP_MAXF: i64 = 256 |
functions
| 23 | func kp_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 } |
| 24 | func kp_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 26 | func kp_read_file(path: *u8, buf: *u8, cap: i64) -> i64 |
| 41 | func kp_exists(path: *u8) -> i64 |
| 48 | func kp_scan_to(buf: *u8, n: i64, start: i64, delim: i64) -> i64 called by 1: main |
| 55 | func kp_app(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: main |
| 57 | func kp_vstr(v: i64) -> *u8 called by 1: kp_emit |
| 65 | func kp_emit(fd: i64, nf: i64, present: i64, cpos: i64, cneg: i64, cov: i64, verdict: i64, ok: i64) -> i64 |
| 77 | func main() -> i64 |