code wiki / _hdl_build / nx_emu_x86_test.nx
nx_emu_x86_test.nx
buildroot/runtime/_hdl_build/nx_emu_x86_test.nx
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
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
structs
| none |
consts
| none |
functions
| 10 | func 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 |
| 11 | func x_num(v: i64) -> i64 called by 1: main |
| 19 | func x_put_b(code: *u8, o: i64, byte: i64) -> i64 { code[o] = byte & 0xff; return o + 1 } |
| 20 | func x_put_i32(code: *u8, o: i64, v: i64) -> i64 |
| 26 | func x_naf(C: i64, pos: *i64, sign: *i64) -> i64 called by 1: main |
| 36 | func x_run(x: i64, pos: *i64, sign: *i64, nt: i64) -> i64 |
| 54 | func main() -> i64 |