code wiki / _hdl_build / nx_emu_x86_test.nx

nx_emu_x86_test.nx

buildroot/runtime/_hdl_build/nx_emu_x86_test.nx

4958 B96 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic emu
docsdependenciesstructsconstsfunctions

about

nx_emu_x86_test.nx -- (#3) prove the sovereign x86-64 interpreter, and use it as the THIRD execution target for the generator. (1) a KAT exits 42; (2) the NAF generator authors x86-64 machine code for x*C and emu_x86_run PROVES it computes x*C. The oracle (native x*C) is independent of both the encoding and the emulator, so agreement convicts a bug in either. Three target families now: RV64 + AArch64 + x86-64. Known answer: KAT + every constant verified -> exit 0.

dependencies 1 imports · 0 importers

nx_emu_x86.nx nx_emu_x86_test.nx

imports: nx_emu_x86.nx

imported by: nobody (leaf or entry point)

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

main x_puts x_put_b x_put_i32 emu_x86_run emu_x86_i32 x_num x_naf x_run x_put_b ↻ x_put_i32 ↻ emu_x86_run ↻

structs

none

consts

none

functions

10func x_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
11func x_num(v: i64) -> i64
called by 1: main
19func x_put_b(code: *u8, o: i64, byte: i64) -> i64 { code[o] = byte & 0xff; return o + 1 }
called by 2: x_runmain
20func x_put_i32(code: *u8, o: i64, v: i64) -> i64
called by 2: x_runmain
26func x_naf(C: i64, pos: *i64, sign: *i64) -> i64
called by 1: main
36func x_run(x: i64, pos: *i64, sign: *i64, nt: i64) -> i64
called by 1: main calls 3: x_put_bx_put_i32emu_x86_run
54func main() -> i64