code wiki / _hdl_build / nx_isa_spec_test.nx
nx_isa_spec_test.nx
buildroot/runtime/_hdl_build/nx_isa_spec_test.nx
about
nx_isa_spec_test.nx -- prove the SPEC-DRIVEN encoder: (1) it reproduces the
oracle-verified KAT words (the same ones riscv64-as emits, per nx_emu_rv64_test),
(2) instructions added by DATA (xor, or) encode correctly, and (3) a program the
SEARCH authored, lowered THROUGH the spec table to BOTH RV64 and AArch64, runs
correctly on the sovereign emulators. No per-instruction encoder was hand-written
-- each instruction is a data row + one shared format assembler.
Known answer: KATs match, both arches execute x*C for the searched constants,
exit 0.
dependencies 3 imports · 0 importers
imports: nx_isa_spec.nxnx_emu_rv64.nxnx_emu_arm64.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
| 15 | func is_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 |
| 16 | func is_num(v: i64) -> i64 called by 1: main |
| 24 | func is_put_w(code: *u8, o: i64, w: i64) -> i64 |
| 30 | func is_eval(a: i64, op: i64, b: i64, x: i64) -> i64 { if op == 0 { return (x << a) + (x << b) } return (x << a) - (x << b) } called by 1: is_best |
| 31 | func is_best(C: i64, out: *i64) -> i64 |
| 54 | func is_run_rv(x: i64, a: i64, op: i64, b: i64) -> i64 |
| 65 | func is_run_a64(x: i64, a: i64, op: i64, b: i64) -> i64 |
| 75 | func main() -> i64 |