code wiki / _hdl_build / nx_simd_sse_rot_gate.nx

nx_simd_sse_rot_gate.nx

buildroot/runtime/_hdl_build/nx_simd_sse_rot_gate.nx

4785 B116 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic simd
docsdependenciesstructsconstsfunctions

about

nx_simd_sse_rot_gate.nx -- SOVEREIGN 128-bit SSE2 packed-shift/bitwise run-KAT (rung R1 of the sovereign VECTOR backend). Proves the packed ROTATE primitive -- the inner loop of every ARX cipher (ChaCha/BLAKE/Salsa) -- on REAL x86 silicon, NO gcc/qemu/binutils. AUTHOR=ORGAN, no-false-green. rotl32(x,n) = (pslld x,n) OR (psrld x,32-n). With x=0x80000001, n=1: pslld $1 -> 0x00000002 (top bit shifted out of the 32-bit lane) psrld $31 -> 0x00000001 (top bit becomes bit 0) por -> 0x00000003 (both halves load-bearing => por is real) POS exit = 3. NEG swaps por->pand: 0x2 & 0x1 = 0 -> exit 0 (distinct => real silicon read). GREEN iff pos==3 AND neg==0 AND pos!=neg. Run-proves: pslld, psrld, por (POS), pand (NEG), movdqa reg-reg copy, + movdqu load/store again. The padd{b,w,q}/ psub{b,w,d,q} twins share the proven x86_sse_rr path (different opcode byte only). Appends knowledge/status/simd_vec_kat.log. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_simd_sse_rot_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_rot_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

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

functions

21func 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_rot_sg_emit calls 1: sys_write
22func gwn(fd: i64, v: i64) -> i64
called by 1: g_emit calls 2: sys_mmapsys_write
33func g_run(path: *u8, argv: *i64) -> i64
53func asm_and_run(spath: *u8, elfpath: *u8) -> i64
called by 1: main calls 2: sys_mmapg_run
68func write_rot_s(path: *u8, use_and: i64) -> i64
called by 1: main calls 3: sys_openat_wrgwsys_close
92func g_emit(fd: i64, pos: i64, neg: i64, ok: i64) -> i64
called by 1: main calls 2: gwgwn
100func main() -> i64