code wiki / _hdl_build / nx_simd_avx2_kat_gate.nx

nx_simd_avx2_kat_gate.nx

buildroot/runtime/_hdl_build/nx_simd_avx2_kat_gate.nx

4592 B113 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic simd
docsdependenciesstructsconstsfunctions

about

nx_simd_avx2_kat_gate.nx -- SOVEREIGN 256-bit AVX2 vector run-KAT (the VEX rung): proves the sovereign encoder/assembler emit working VEX-encoded ymm load/compute/store on REAL x86 silicon (host has avx2), NO gcc/qemu/binutils. AUTHOR=ORGAN, no-false-green. 8x u32 lanes: vecA lane0=10, vecB lane0=32. POS: vmovdqu ymm load x2; vpaddd ymm -> lane0=42; vmovdqu ymm store; reload -> exit(42). NEG: + vpxor %ymm0,%ymm0,%ymm0 (self-xor zero) -> exit(0). GREEN iff pos==42 AND neg==0 AND pos!=neg. Run-proves the 3-byte VEX encoder (x86_vex_rrr / x86_vex_rm), ymm register parsing, and the 3-operand AT&T form -- the foundation every AVX2 capability (and, with EVEX, AVX-512) reuses. Appends knowledge/status/simd_vec_kat.log. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_simd_avx2_kat_gate.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 write_avx2_s sys_openat_wr gw sys_write sys_close asm_and_run sys_mmap g_run sys_mmap ↻ sys_openat_wr ↻ sys_fork sys_dup3 sys_execve sys_exit sys_wait4 sys_close ↻ g_emit gw ↻ gwn sys_mmap ↻ sys_write ↻ sys_openat_append sys_close ↻

structs

none

consts

14const ASM_TOOL: *u8 = "_offc/nxasm_x86_main.elf"
15const SV_LOG: *u8 = "knowledge/status/simd_vec_kat.log"

functions

17func gw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: write_avx2_sg_emit calls 1: sys_write
18func gwn(fd: i64, v: i64) -> i64
called by 1: g_emit calls 2: sys_mmapsys_write
29func g_run(path: *u8, argv: *i64) -> i64
49func asm_and_run(spath: *u8, elfpath: *u8) -> i64
called by 1: main calls 2: sys_mmapg_run
63func write_avx2_s(path: *u8, zero: i64) -> i64
called by 1: main calls 3: sys_openat_wrgwsys_close
89func g_emit(fd: i64, pos: i64, neg: i64, ok: i64) -> i64
called by 1: main calls 2: gwgwn
97func main() -> i64