code wiki / (root) / _self_host_vdot_test.nx

_self_host_vdot_test.nx

buildroot/runtime/_self_host_vdot_test.nx

1364 B39 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic self
docsdependenciesstructsconstsfunctions

about

_self_host_vdot_test.nx -- proves the self-host can emit __simd_vdot_i16_x16 end-to-end through NishiLang only. Build path (NO new C code added -- only existing C anchor): nxc2.exe (one-time bootstrap) -> nxc.elf (the self-host) nxc.elf compiles THIS file using its new __simd_vdot_i16_x16 parse builtin + IR builder + RV-V codegen. Result: an RV-V program that runs on qemu and exits with the dot product as its return code. dot([1..16] . [1..16]) = sum(i^2 for i=1..16) = 1496. Doesn't fit in u8 exit code (max 255), so we mod by 251 (next prime below 256) and exit with that. 1496 % 251 = 241.

dependencies 1 imports · 0 importers

nx_syscalls.nx _self_host_vdot_test.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap pack4_i16

structs

none

consts

none

functions

17func pack4_i16(a: i64, b: i64, c: i64, d: i64) -> i64
called by 1: main
24func main() -> i64