code wiki / (root) / _offc_probe_module.nx

_offc_probe_module.nx source

↩ module page · 17 lines · 430 B

1// Replicates the start of regalloc_test.nx using the same nx_ir.nx 2// types — to isolate whether the bug is in Module struct handling. 3 4import "nx_syscalls.nx" 5import "nx_types.nx" 6import "nx_ir.nx" 7 8func main() -> i64 { 9 let m_raw: *u8 = sys_mmap(256) 10 let m: *Module = m_raw as *Module 11 m.name = "test" as *u8 12 m.functions = 0 as *Function 13 m.n_functions = 0 14 15 sys_write(1, "ok\n" as *u8, 3) 16 return 0 17}