code wiki / _hdl_build / nx_vmtest_vm_gate.nx

nx_vmtest_vm_gate.nx

buildroot/runtime/_hdl_build/nx_vmtest_vm_gate.nx

3152 B55 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_vmtest_vm_gate.nx -- isolate nx_wasm_vm's per-opcode correctness on known answers (task #21). Runs each tiny exported bit-op through the VM and checks the exact result. If xor/not pass here, the VM's ops are sound and the SHA-256 wasm discrepancy is a wat-backend lowering issue; if they fail, the VM opcode handler is the bug.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_wasm_vm.nx nx_gate_verdict.nx nx_vmtest_vm_gate.nx

imports: nx_syscalls.nxnx_wasm_vm.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

8func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
9func g_pn(v: i64) -> i64
19func chk(mod: *WasmMod, name: *u8, a: i64, b: i64, na: i64, want: i64) -> i64
26func main() -> i64