topic: smoke
223 modules sharing the smoke name family (derived from the tree's prefix discipline).
The 'smoke' topic family in the Nishi sovereign ecosystem focuses on testing low-level assembly behaviors and memory allocation within the NishiLang framework. Modules like nx_smoke_alloc_call examine nested sys_mmap calls, while nx_smoke_asm_b1 and nx_smoke_asm_b15 explore assembler output variations, such as byte counts and label differences. These modules collectively validate edge cases in assembly syntax and system call interactions, ensuring robustness across the 223-module family.
auto-narrated by the local model from this topic's module headers; links verified against the wiki index.
narrated overview -- maintained by the narration lane, module links verified against this wiki.
| module | description | lines | funcs |
|---|---|---|---|
| nx_smoke_alloc_call.nx | nested sys_mmap inside a called function. | 27 | 2 |
| nx_smoke_asm_b1.nx | Bisect: how many bytes does the assembler return for various | 21 | 1 |
| nx_smoke_asm_b10.nx | duplicate of b5 for sanity | 18 | 1 |
| nx_smoke_asm_b11.nx | just `.text` + label + 4 inst | 18 | 1 |
| nx_smoke_asm_b12.nx | just `.globl main` + label + 4 inst | 18 | 1 |
| nx_smoke_asm_b13.nx | Two `.text` directives, label, 4 inst. (Two-directive pattern test.) | 18 | 1 |
| nx_smoke_asm_b14.nx | .text + .globl main, NO label between, 4 inst | 18 | 1 |
| nx_smoke_asm_b15.nx | arg name DIFFERS from label | 18 | 1 |
| nx_smoke_asm_b16.nx | directives + label + 5 inst | 18 | 1 |
| nx_smoke_asm_b17.nx | 1 directive + label + 5 inst | 18 | 1 |
| nx_smoke_asm_b18.nx | directives + label + 4 inst, but use a longer label name | 18 | 1 |
| nx_smoke_asm_b19.nx | b11 (which works) plus one more `nop` | 18 | 1 |
| nx_smoke_asm_b2.nx | nx_safety_envelope: | 17 | 1 |
| nx_smoke_asm_b20.nx | just li a1, 40 | 18 | 1 |
| nx_smoke_asm_b21.nx | test22 with ret -> nop | 18 | 1 |
| nx_smoke_asm_b22.nx | test22 with li -> mv (so 4 inst, all reg-reg or reg-imm-reg) | 19 | 1 |
| nx_smoke_asm_b3.nx | nx_safety_envelope: | 17 | 1 |
| nx_smoke_asm_b4.nx | 4 instructions, no directives, no label. | 18 | 1 |
| nx_smoke_asm_b5.nx | 4 instructions WITH label. | 18 | 1 |
| nx_smoke_asm_b6.nx | directives + label + addi only (1 inst expected) | 18 | 1 |
| nx_smoke_asm_b7.nx | directives + label + addi + ret (2 inst expected) | 18 | 1 |
| nx_smoke_asm_b8.nx | directives + label + addi + sd + ret (3 inst expected) | 18 | 1 |
| nx_smoke_asm_b9.nx | directives + 4 inst NO label | 18 | 1 |
| nx_smoke_asm_d1.nx | Diagnostic: which instructions actually got emitted in test22? | 24 | 1 |
| nx_smoke_asm_d10.nx | Dump bytes near 53-67 by index to see what's there. | 13 | 1 |
| nx_smoke_asm_d2.nx | Return byte[4] (second instruction's first byte). | 18 | 1 |
| nx_smoke_asm_d3.nx | Return byte[8] (third instruction's first byte). | 18 | 1 |
| nx_smoke_asm_d4.nx | exit code is u8 anyway, but let's | 22 | 1 |
| nx_smoke_asm_d5.nx | Reach into Asm to see pass 1 cur_addr vs pass 2 out_pos. | 45 | 1 |
| nx_smoke_asm_d6.nx | Drive the assembler with a manually-built byte buffer, to rule | 64 | 1 |
| nx_smoke_asm_d7.nx | Pure string-literal sanity check. Same string as test22. | 16 | 1 |
| nx_smoke_asm_d8.nx | Dump byte at position 60 of the literal. | 13 | 1 |
| nx_smoke_asm_d9.nx | Dump byte at position 63 of the literal (where strlen stops). | 13 | 1 |
| nx_smoke_asm_test10.nx | .text without newline. | 20 | 1 |
| nx_smoke_asm_test11.nx | .byte directive (specifically handled). | 20 | 1 |
| nx_smoke_asm_test12.nx | addi with negative immediate. | 20 | 1 |
| nx_smoke_asm_test13.nx | sd with memory operand format. | 20 | 1 |
| nx_smoke_asm_test14.nx | progressively larger test. | 23 | 1 |
| nx_smoke_asm_test15.nx | just 2 consecutive li instructions. | 23 | 1 |
| nx_smoke_asm_test16.nx | .globl with operand. | 23 | 1 |
| nx_smoke_asm_test17.nx | what breaks when adding label? | 23 | 1 |
| nx_smoke_asm_test18.nx | .text then label. | 23 | 1 |
| nx_smoke_asm_test19.nx | 2 directives + label. | 23 | 1 |
| nx_smoke_asm_test2.nx | minimal assembly test. | 22 | 1 |
| nx_smoke_asm_test20.nx | add addi with negative imm. | 23 | 1 |
| nx_smoke_asm_test21.nx | add sd after addi. | 23 | 1 |
| nx_smoke_asm_test22.nx | full test14 with an additional `ret` final. | 20 | 1 |
| nx_smoke_asm_test23.nx | print emitted bytes. | 42 | 1 |
| nx_smoke_asm_test24.nx | test22 MINUS label. | 20 | 1 |
| nx_smoke_asm_test25.nx | directives + label + 3 insts (drop li). | 20 | 1 |
| nx_smoke_asm_test26.nx | like test22 but reorder: ret before li. | 20 | 1 |
| nx_smoke_asm_test3.nx | add directive + label. | 21 | 1 |
| nx_smoke_asm_test4.nx | just label + li + ret. | 21 | 1 |
| nx_smoke_asm_test5.nx | just .text directive. | 21 | 1 |
| nx_smoke_asm_test6.nx | like test5 but trailing space before newline. | 21 | 1 |
| nx_smoke_asm_test7.nx | literally just .text + ret. | 23 | 1 |
| nx_smoke_asm_test8.nx | just .text, no mnemonic. | 23 | 1 |
| nx_smoke_asm_test9.nx | empty source. | 19 | 1 |
| nx_smoke_call.nx | verify a function call returns its value through the chain. | 18 | 2 |
| nx_smoke_codegen_bug.nx | Minimal repro for the nested-if codegen bug: | 34 | 1 |
| nx_smoke_dom_inspect.nx | Probe dom_test to see what b4.idom actually is. | 36 | 1 |
| nx_smoke_elf_minimal.nx | Minimal write_elf test: 4 bytes of code, write to stderr (fd 2). | 18 | 1 |
| nx_smoke_exit42.nx | minimal RV64 sovereign smoke test. | 14 | 1 |
| nx_smoke_harness.nx | adapter smoke-test runner. | 256 | 5 |
| nx_smoke_imports.nx | test import + tok_at-like memory layout. | 23 | 1 |
| nx_smoke_lex2.nx | lex two tokens. | 20 | 1 |
| nx_smoke_lex3.nx | lex multiple tokens. | 20 | 1 |
| nx_smoke_lex4.nx | larger input, exercise lex_string + lex_number paths. | 20 | 1 |
| nx_smoke_lex5.nx | exact lex_test source, but no token verification. | 20 | 1 |
| nx_smoke_lex6.nx | lex + read first tok kind. | 21 | 1 |
| nx_smoke_lex7.nx | exact lex_test logic. | 34 | 1 |
| nx_smoke_lex_min.nx | minimal lex_source call. | 23 | 1 |
| nx_smoke_loop.nx | exercise a while loop + struct field write inside. | 26 | 1 |
| nx_smoke_mmap.nx | verify sys_mmap works in our RV64 ELF chain. | 22 | 1 |
| nx_smoke_nxasm_demo.nx | Take nxc2's actual asm output for a simple program and try to | 28 | 1 |
| nx_smoke_nxasm_demo2.nx | Same as smoke_nxasm_demo.nx but with the full directive header | 22 | 1 |
| nx_smoke_nxc_pipeline.nx | Replay nxc.nx's pipeline on the baked-in demo, reporting at | 79 | 1 |
| nx_smoke_nxc_pipeline10.nx | Pipeline through stage 3 only, then write_elf with fresh code. | 57 | 1 |
| nx_smoke_nxc_pipeline11.nx | Just lex+parse, no opt/regalloc/emit, then write_elf. | 26 | 1 |
| nx_smoke_nxc_pipeline12.nx | lex+parse+opt only. | 34 | 1 |
| nx_smoke_nxc_pipeline13.nx | lex+parse+opt+regalloc. | 47 | 1 |
| nx_smoke_nxc_pipeline14.nx | Report f.n_values after parse+opt for the demo. | 25 | 1 |
| nx_smoke_nxc_pipeline15.nx | Same as pipeline13 but allocate huge locs to rule out overflow. | 48 | 1 |
| nx_smoke_nxc_pipeline2.nx | Same as smoke_nxc_pipeline.nx but skip the crt0 stub to see if | 65 | 1 |
| nx_smoke_nxc_pipeline3.nx | Inspect m.n_functions after parse_module. | 27 | 1 |
| nx_smoke_nxc_pipeline4.nx | Try simpler source: no __syscall, just a constant return. | 27 | 1 |
| nx_smoke_nxc_pipeline5.nx | Try minimal source matching parse_test's expectations. | 27 | 1 |
| nx_smoke_nxc_pipeline6.nx | Inspect tokens generated by lex_source for `func f() { return 42 }`. | 30 | 1 |
| nx_smoke_nxc_pipeline7.nx | Add stage 5 (write_elf) to the pipeline replay. Writes to fd 3 | 70 | 1 |
| nx_smoke_nxc_pipeline8.nx | Same imports as nxc.nx but ONLY call write_elf, skip all the | 32 | 1 |
| nx_smoke_nxc_pipeline9.nx | Pipeline first, but call write_elf with a FRESH code buffer | 63 | 1 |
| nx_smoke_nxc_tilde.nx | 1:1 proof that the SELF-HOSTED RV64 backend | 73 | 1 |
| nx_smoke_objdump.nx | write -> read round-trip smoke test. | 62 | 1 |
| nx_smoke_regalloc_min.nx | Minimal regalloc invocation: build a Function with NO values | 40 | 1 |
| nx_smoke_regalloc_min2.nx | Regalloc on a 3-value function: const+const+add+ret. | 40 | 1 |
| nx_smoke_regalloc_min3.nx | Regalloc on 1-value function: const, return it. | 38 | 1 |
| nx_smoke_regalloc_min4.nx | 2-value function: 2 consts. | 38 | 1 |
| nx_smoke_regalloc_min5.nx | 3 consts, no binop. | 34 | 1 |
| nx_smoke_regalloc_min6.nx | isolate whether binop alone crashes. | 35 | 1 |
| nx_smoke_regalloc_min7.nx | Build a binop, then INSPECT the IR fields directly without | 36 | 1 |
| nx_smoke_regalloc_step.nx | Replay regalloc_function step-by-step on a binop function, | 83 | 1 |
| nx_smoke_repro.nx | minimal repro of codegen bug. | 47 | 2 |
| nx_smoke_repro2.nx | closer to the lex_ident_or_kw shape. | 51 | 4 |
| nx_smoke_repro3.nx | adds the text[i] = c style write. | 55 | 5 |
| nx_smoke_repro4.nx | match Tok's 12-field layout + lex_ident_or_kw shape. | 82 | 5 |
| nx_smoke_sim.nx | end-to-end smoke test of the off-C run-loop. | 97 | 1 |
| nx_smoke_str_a.nx | 64-byte string (no terminator counted). | 16 | 1 |
| nx_smoke_str_arg.nx | pass a string literal to a function, read first byte. | 19 | 2 |
| nx_smoke_str_b.nx | 65-byte string. | 15 | 1 |
| nx_smoke_str_c.nx | 100-byte string. | 15 | 1 |
| nx_smoke_str_index.nx | string indexing via *u8. | 21 | 1 |
| nx_smoke_struct.nx | struct alloc + field write/read. | 23 | 1 |
| nx_smoke_write.nx | verify sys_write to stdout works. | 20 | 1 |
| smoke_alloc_call.nx | nested sys_mmap inside a called function. | 21 | 2 |
| smoke_asm_b1.nx | Bisect: how many bytes does the assembler return for various | 15 | 1 |
| smoke_asm_b10.nx | duplicate of b5 for sanity | 12 | 1 |
| smoke_asm_b11.nx | just `.text` + label + 4 inst | 12 | 1 |
| smoke_asm_b12.nx | just `.globl main` + label + 4 inst | 12 | 1 |
| smoke_asm_b13.nx | Two `.text` directives, label, 4 inst. (Two-directive pattern test.) | 12 | 1 |
| smoke_asm_b14.nx | .text + .globl main, NO label between, 4 inst | 12 | 1 |
| smoke_asm_b15.nx | arg name DIFFERS from label | 12 | 1 |
| smoke_asm_b16.nx | directives + label + 5 inst | 12 | 1 |
| smoke_asm_b17.nx | 1 directive + label + 5 inst | 12 | 1 |
| smoke_asm_b18.nx | directives + label + 4 inst, but use a longer label name | 12 | 1 |
| smoke_asm_b19.nx | b11 (which works) plus one more `nop` | 12 | 1 |
| smoke_asm_b2.nx | 11 | 1 | |
| smoke_asm_b20.nx | just li a1, 40 | 12 | 1 |
| smoke_asm_b21.nx | test22 with ret -> nop | 12 | 1 |
| smoke_asm_b22.nx | test22 with li -> mv (so 4 inst, all reg-reg or reg-imm-reg) | 13 | 1 |
| smoke_asm_b3.nx | 11 | 1 | |
| smoke_asm_b4.nx | 4 instructions, no directives, no label. | 12 | 1 |
| smoke_asm_b5.nx | 4 instructions WITH label. | 12 | 1 |
| smoke_asm_b6.nx | directives + label + addi only (1 inst expected) | 12 | 1 |
| smoke_asm_b7.nx | directives + label + addi + ret (2 inst expected) | 12 | 1 |
| smoke_asm_b8.nx | directives + label + addi + sd + ret (3 inst expected) | 12 | 1 |
| smoke_asm_b9.nx | directives + 4 inst NO label | 12 | 1 |
| smoke_asm_d1.nx | Diagnostic: which instructions actually got emitted in test22? | 18 | 1 |
| smoke_asm_d10.nx | Dump bytes near 53-67 by index to see what's there. | 7 | 1 |
| smoke_asm_d2.nx | Return byte[4] (second instruction's first byte). | 12 | 1 |
| smoke_asm_d3.nx | Return byte[8] (third instruction's first byte). | 12 | 1 |
| smoke_asm_d4.nx | exit code is u8 anyway, but let's | 16 | 1 |
| smoke_asm_d5.nx | Reach into Asm to see pass 1 cur_addr vs pass 2 out_pos. | 39 | 1 |
| smoke_asm_d6.nx | Drive the assembler with a manually-built byte buffer, to rule | 58 | 1 |
| smoke_asm_d7.nx | Pure string-literal sanity check. Same string as test22. | 10 | 1 |
| smoke_asm_d8.nx | Dump byte at position 60 of the literal. | 7 | 1 |
| smoke_asm_d9.nx | Dump byte at position 63 of the literal (where strlen stops). | 7 | 1 |
| smoke_asm_test.nx | run nxasm_v2 on a small RV64 asm snippet + assert | 17 | 1 |
| smoke_asm_test10.nx | .text without newline. | 14 | 1 |
| smoke_asm_test11.nx | .byte directive (specifically handled). | 14 | 1 |
| smoke_asm_test12.nx | addi with negative immediate. | 14 | 1 |
| smoke_asm_test13.nx | sd with memory operand format. | 14 | 1 |
| smoke_asm_test14.nx | progressively larger test. | 17 | 1 |
| smoke_asm_test15.nx | just 2 consecutive li instructions. | 17 | 1 |
| smoke_asm_test16.nx | .globl with operand. | 17 | 1 |
| smoke_asm_test17.nx | what breaks when adding label? | 17 | 1 |
| smoke_asm_test18.nx | .text then label. | 17 | 1 |
| smoke_asm_test19.nx | 2 directives + label. | 17 | 1 |
| smoke_asm_test2.nx | minimal assembly test. | 16 | 1 |
| smoke_asm_test20.nx | add addi with negative imm. | 17 | 1 |
| smoke_asm_test21.nx | add sd after addi. | 17 | 1 |
| smoke_asm_test22.nx | full test14 with an additional `ret` final. | 14 | 1 |
| smoke_asm_test23.nx | print emitted bytes. | 36 | 1 |
| smoke_asm_test24.nx | test22 MINUS label. | 14 | 1 |
| smoke_asm_test25.nx | directives + label + 3 insts (drop li). | 14 | 1 |
| smoke_asm_test26.nx | like test22 but reorder: ret before li. | 14 | 1 |
| smoke_asm_test3.nx | add directive + label. | 15 | 1 |
| smoke_asm_test4.nx | just label + li + ret. | 15 | 1 |
| smoke_asm_test5.nx | just .text directive. | 15 | 1 |
| smoke_asm_test6.nx | like test5 but trailing space before newline. | 15 | 1 |
| smoke_asm_test7.nx | literally just .text + ret. | 17 | 1 |
| smoke_asm_test8.nx | just .text, no mnemonic. | 17 | 1 |
| smoke_asm_test9.nx | empty source. | 13 | 1 |
| smoke_call.nx | verify a function call returns its value through the chain. | 12 | 2 |
| smoke_codegen_bug.nx | Minimal repro for the nested-if codegen bug: | 28 | 1 |
| smoke_dom_inspect.nx | Probe dom_test to see what b4.idom actually is. | 30 | 1 |
| smoke_elf_minimal.nx | Minimal write_elf test: 4 bytes of code, write to stderr (fd 2). | 12 | 1 |
| smoke_exit42.nx | minimal RV64 sovereign smoke test. | 14 | 1 |
| smoke_imports.nx | test import + tok_at-like memory layout. | 17 | 1 |
| smoke_lex2.nx | lex two tokens. | 14 | 1 |
| smoke_lex3.nx | lex multiple tokens. | 14 | 1 |
| smoke_lex4.nx | larger input, exercise lex_string + lex_number paths. | 14 | 1 |
| smoke_lex5.nx | exact lex_test source, but no token verification. | 14 | 1 |
| smoke_lex6.nx | lex + read first tok kind. | 15 | 1 |
| smoke_lex7.nx | exact lex_test logic. | 28 | 1 |
| smoke_lex_min.nx | minimal lex_source call. | 17 | 1 |
| smoke_loop.nx | exercise a while loop + struct field write inside. | 20 | 1 |
| smoke_mmap.nx | verify sys_mmap works in our RV64 ELF chain. | 15 | 1 |
| smoke_nxasm_demo.nx | Take nxc2's actual asm output for a simple program and try to | 22 | 1 |
| smoke_nxasm_demo2.nx | Same as smoke_nxasm_demo.nx but with the full directive header | 16 | 1 |
| smoke_nxc_pipeline.nx | Replay nxc.nx's pipeline on the baked-in demo, reporting at | 73 | 1 |
| smoke_nxc_pipeline10.nx | Pipeline through stage 3 only, then write_elf with fresh code. | 51 | 1 |
| smoke_nxc_pipeline11.nx | Just lex+parse, no opt/regalloc/emit, then write_elf. | 20 | 1 |
| smoke_nxc_pipeline12.nx | lex+parse+opt only. | 28 | 1 |
| smoke_nxc_pipeline13.nx | lex+parse+opt+regalloc. | 41 | 1 |
| smoke_nxc_pipeline14.nx | Report f.n_values after parse+opt for the demo. | 19 | 1 |
| smoke_nxc_pipeline15.nx | Same as pipeline13 but allocate huge locs to rule out overflow. | 42 | 1 |
| smoke_nxc_pipeline2.nx | Same as smoke_nxc_pipeline.nx but skip the crt0 stub to see if | 59 | 1 |
| smoke_nxc_pipeline3.nx | Inspect m.n_functions after parse_module. | 21 | 1 |
| smoke_nxc_pipeline4.nx | Try simpler source: no __syscall, just a constant return. | 21 | 1 |
| smoke_nxc_pipeline5.nx | Try minimal source matching parse_test's expectations. | 21 | 1 |
| smoke_nxc_pipeline6.nx | Inspect tokens generated by lex_source for `func f() { return 42 }`. | 23 | 1 |
| smoke_nxc_pipeline7.nx | Add stage 5 (write_elf) to the pipeline replay. Writes to fd 3 | 64 | 1 |
| smoke_nxc_pipeline8.nx | Same imports as nxc.nx but ONLY call write_elf, skip all the | 26 | 1 |
| smoke_nxc_pipeline9.nx | Pipeline first, but call write_elf with a FRESH code buffer | 57 | 1 |
| smoke_regalloc_min.nx | Minimal regalloc invocation: build a Function with NO values | 33 | 1 |
| smoke_regalloc_min2.nx | Regalloc on a 3-value function: const+const+add+ret. | 33 | 1 |
| smoke_regalloc_min3.nx | Regalloc on 1-value function: const, return it. | 31 | 1 |
| smoke_regalloc_min4.nx | 2-value function: 2 consts. | 31 | 1 |
| smoke_regalloc_min5.nx | 3 consts, no binop. | 28 | 1 |
| smoke_regalloc_min6.nx | isolate whether binop alone crashes. | 29 | 1 |
| smoke_regalloc_min7.nx | Build a binop, then INSPECT the IR fields directly without | 30 | 1 |
| smoke_regalloc_step.nx | Replay regalloc_function step-by-step on a binop function, | 76 | 1 |
| smoke_repro.nx | minimal repro of codegen bug. | 41 | 2 |
| smoke_repro2.nx | closer to the lex_ident_or_kw shape. | 45 | 4 |
| smoke_repro3.nx | adds the text[i] = c style write. | 49 | 5 |
| smoke_repro4.nx | match Tok's 12-field layout + lex_ident_or_kw shape. | 76 | 5 |
| smoke_str_a.nx | 64-byte string (no terminator counted). | 10 | 1 |
| smoke_str_arg.nx | pass a string literal to a function, read first byte. | 13 | 2 |
| smoke_str_b.nx | 65-byte string. | 9 | 1 |
| smoke_str_c.nx | 100-byte string. | 9 | 1 |
| smoke_str_index.nx | string indexing via *u8. | 15 | 1 |
| smoke_struct.nx | struct alloc + field write/read. | 17 | 1 |
| smoke_write.nx | verify sys_write to stdout works. | 14 | 1 |