code wiki / _hdl_build / nx_riscv_emit.nx

nx_riscv_emit.nx

buildroot/runtime/_hdl_build/nx_riscv_emit.nx

3787 B57 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic riscv
docsdependenciesstructsconstsfunctions

about

nx_riscv_emit.nx -- SOVEREIGN RISC-V backend RUNG 1: our own rv64im encoder. Now on the GENERAL nx_riscv_lib (shared enc_r/enc_i/enc_s, UI) -- only hex-print + canonical self-assert + matvec emission are local. T1 the 8 core rv64im instructions each encode to their canonical machine code. T2 (teeth) a wrong field (add funct7=1) != canonical add. T3 emit the no-float matvec loop to a .bin. expect_exit: 0 Sovereign: nx_riscv_lib (+ nx_syscalls).

dependencies 2 imports · 0 importers

nx_riscv_lib.nx nx_syscalls.nx nx_riscv_emit.nx

imports: nx_riscv_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write assert_enc g_puts ↻ g_hex sys_mmap sys_write ↻ enc_r enc_i enc_s ck g_puts ↻ sys_openat_wr wr_word sys_mmap ↻ sys_write ↻ sys_close g_pn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_openat_append sys_write ↻ sys_exit

structs

none

consts

none

functions

9func g_hex(v: i64) -> i64
called by 1: assert_enc calls 2: sys_mmapsys_write
14func assert_enc(name: *u8, got: i64, want: i64) -> i64
called by 1: main calls 2: g_putsg_hex
19func wr_word(fd: i64, w: i64) -> i64 { let b: *u8=sys_mmap(4); b[0]=(w&255) as u8; b[1]=((w>>8)&255) as u8; b[2]=((w>>16)&255) as u8; b[3]=((w>>24)&255) as u8; sys_write(fd,b,4); return 0 }
called by 1: main calls 2: sys_mmapsys_write
21func main() -> i64