code wiki / smoke

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.

moduledescriptionlinesfuncs
nx_smoke_alloc_call.nxnested sys_mmap inside a called function.272
nx_smoke_asm_b1.nxBisect: how many bytes does the assembler return for various211
nx_smoke_asm_b10.nxduplicate of b5 for sanity181
nx_smoke_asm_b11.nxjust `.text` + label + 4 inst181
nx_smoke_asm_b12.nxjust `.globl main` + label + 4 inst181
nx_smoke_asm_b13.nxTwo `.text` directives, label, 4 inst. (Two-directive pattern test.)181
nx_smoke_asm_b14.nx.text + .globl main, NO label between, 4 inst181
nx_smoke_asm_b15.nxarg name DIFFERS from label181
nx_smoke_asm_b16.nxdirectives + label + 5 inst181
nx_smoke_asm_b17.nx1 directive + label + 5 inst181
nx_smoke_asm_b18.nxdirectives + label + 4 inst, but use a longer label name181
nx_smoke_asm_b19.nxb11 (which works) plus one more `nop`181
nx_smoke_asm_b2.nxnx_safety_envelope:171
nx_smoke_asm_b20.nxjust li a1, 40181
nx_smoke_asm_b21.nxtest22 with ret -> nop181
nx_smoke_asm_b22.nxtest22 with li -> mv (so 4 inst, all reg-reg or reg-imm-reg)191
nx_smoke_asm_b3.nxnx_safety_envelope:171
nx_smoke_asm_b4.nx4 instructions, no directives, no label.181
nx_smoke_asm_b5.nx4 instructions WITH label.181
nx_smoke_asm_b6.nxdirectives + label + addi only (1 inst expected)181
nx_smoke_asm_b7.nxdirectives + label + addi + ret (2 inst expected)181
nx_smoke_asm_b8.nxdirectives + label + addi + sd + ret (3 inst expected)181
nx_smoke_asm_b9.nxdirectives + 4 inst NO label181
nx_smoke_asm_d1.nxDiagnostic: which instructions actually got emitted in test22?241
nx_smoke_asm_d10.nxDump bytes near 53-67 by index to see what's there.131
nx_smoke_asm_d2.nxReturn byte[4] (second instruction's first byte).181
nx_smoke_asm_d3.nxReturn byte[8] (third instruction's first byte).181
nx_smoke_asm_d4.nxexit code is u8 anyway, but let's221
nx_smoke_asm_d5.nxReach into Asm to see pass 1 cur_addr vs pass 2 out_pos.451
nx_smoke_asm_d6.nxDrive the assembler with a manually-built byte buffer, to rule641
nx_smoke_asm_d7.nxPure string-literal sanity check. Same string as test22.161
nx_smoke_asm_d8.nxDump byte at position 60 of the literal.131
nx_smoke_asm_d9.nxDump byte at position 63 of the literal (where strlen stops).131
nx_smoke_asm_test10.nx.text without newline.201
nx_smoke_asm_test11.nx.byte directive (specifically handled).201
nx_smoke_asm_test12.nxaddi with negative immediate.201
nx_smoke_asm_test13.nxsd with memory operand format.201
nx_smoke_asm_test14.nxprogressively larger test.231
nx_smoke_asm_test15.nxjust 2 consecutive li instructions.231
nx_smoke_asm_test16.nx.globl with operand.231
nx_smoke_asm_test17.nxwhat breaks when adding label?231
nx_smoke_asm_test18.nx.text then label.231
nx_smoke_asm_test19.nx2 directives + label.231
nx_smoke_asm_test2.nxminimal assembly test.221
nx_smoke_asm_test20.nxadd addi with negative imm.231
nx_smoke_asm_test21.nxadd sd after addi.231
nx_smoke_asm_test22.nxfull test14 with an additional `ret` final.201
nx_smoke_asm_test23.nxprint emitted bytes.421
nx_smoke_asm_test24.nxtest22 MINUS label.201
nx_smoke_asm_test25.nxdirectives + label + 3 insts (drop li).201
nx_smoke_asm_test26.nxlike test22 but reorder: ret before li.201
nx_smoke_asm_test3.nxadd directive + label.211
nx_smoke_asm_test4.nxjust label + li + ret.211
nx_smoke_asm_test5.nxjust .text directive.211
nx_smoke_asm_test6.nxlike test5 but trailing space before newline.211
nx_smoke_asm_test7.nxliterally just .text + ret.231
nx_smoke_asm_test8.nxjust .text, no mnemonic.231
nx_smoke_asm_test9.nxempty source.191
nx_smoke_call.nxverify a function call returns its value through the chain.182
nx_smoke_codegen_bug.nxMinimal repro for the nested-if codegen bug:341
nx_smoke_dom_inspect.nxProbe dom_test to see what b4.idom actually is.361
nx_smoke_elf_minimal.nxMinimal write_elf test: 4 bytes of code, write to stderr (fd 2).181
nx_smoke_exit42.nxminimal RV64 sovereign smoke test. 141
nx_smoke_harness.nxadapter smoke-test runner.2565
nx_smoke_imports.nxtest import + tok_at-like memory layout.231
nx_smoke_lex2.nxlex two tokens.201
nx_smoke_lex3.nxlex multiple tokens.201
nx_smoke_lex4.nxlarger input, exercise lex_string + lex_number paths.201
nx_smoke_lex5.nxexact lex_test source, but no token verification.201
nx_smoke_lex6.nxlex + read first tok kind.211
nx_smoke_lex7.nxexact lex_test logic.341
nx_smoke_lex_min.nxminimal lex_source call.231
nx_smoke_loop.nxexercise a while loop + struct field write inside.261
nx_smoke_mmap.nxverify sys_mmap works in our RV64 ELF chain.221
nx_smoke_nxasm_demo.nxTake nxc2's actual asm output for a simple program and try to281
nx_smoke_nxasm_demo2.nxSame as smoke_nxasm_demo.nx but with the full directive header221
nx_smoke_nxc_pipeline.nxReplay nxc.nx's pipeline on the baked-in demo, reporting at791
nx_smoke_nxc_pipeline10.nxPipeline through stage 3 only, then write_elf with fresh code.571
nx_smoke_nxc_pipeline11.nxJust lex+parse, no opt/regalloc/emit, then write_elf.261
nx_smoke_nxc_pipeline12.nxlex+parse+opt only.341
nx_smoke_nxc_pipeline13.nxlex+parse+opt+regalloc.471
nx_smoke_nxc_pipeline14.nxReport f.n_values after parse+opt for the demo.251
nx_smoke_nxc_pipeline15.nxSame as pipeline13 but allocate huge locs to rule out overflow.481
nx_smoke_nxc_pipeline2.nxSame as smoke_nxc_pipeline.nx but skip the crt0 stub to see if651
nx_smoke_nxc_pipeline3.nxInspect m.n_functions after parse_module.271
nx_smoke_nxc_pipeline4.nxTry simpler source: no __syscall, just a constant return.271
nx_smoke_nxc_pipeline5.nxTry minimal source matching parse_test's expectations.271
nx_smoke_nxc_pipeline6.nxInspect tokens generated by lex_source for `func f() { return 42 }`.301
nx_smoke_nxc_pipeline7.nxAdd stage 5 (write_elf) to the pipeline replay. Writes to fd 3701
nx_smoke_nxc_pipeline8.nxSame imports as nxc.nx but ONLY call write_elf, skip all the321
nx_smoke_nxc_pipeline9.nxPipeline first, but call write_elf with a FRESH code buffer631
nx_smoke_nxc_tilde.nx1:1 proof that the SELF-HOSTED RV64 backend731
nx_smoke_objdump.nxwrite -> read round-trip smoke test.621
nx_smoke_regalloc_min.nxMinimal regalloc invocation: build a Function with NO values401
nx_smoke_regalloc_min2.nxRegalloc on a 3-value function: const+const+add+ret.401
nx_smoke_regalloc_min3.nxRegalloc on 1-value function: const, return it.381
nx_smoke_regalloc_min4.nx2-value function: 2 consts.381
nx_smoke_regalloc_min5.nx3 consts, no binop.341
nx_smoke_regalloc_min6.nxisolate whether binop alone crashes.351
nx_smoke_regalloc_min7.nxBuild a binop, then INSPECT the IR fields directly without361
nx_smoke_regalloc_step.nxReplay regalloc_function step-by-step on a binop function,831
nx_smoke_repro.nxminimal repro of codegen bug.472
nx_smoke_repro2.nxcloser to the lex_ident_or_kw shape.514
nx_smoke_repro3.nxadds the text[i] = c style write.555
nx_smoke_repro4.nxmatch Tok's 12-field layout + lex_ident_or_kw shape.825
nx_smoke_sim.nxend-to-end smoke test of the off-C run-loop.971
nx_smoke_str_a.nx64-byte string (no terminator counted).161
nx_smoke_str_arg.nxpass a string literal to a function, read first byte.192
nx_smoke_str_b.nx65-byte string.151
nx_smoke_str_c.nx100-byte string.151
nx_smoke_str_index.nxstring indexing via *u8.211
nx_smoke_struct.nxstruct alloc + field write/read.231
nx_smoke_write.nxverify sys_write to stdout works.201
smoke_alloc_call.nxnested sys_mmap inside a called function. 212
smoke_asm_b1.nxBisect: how many bytes does the assembler return for various 151
smoke_asm_b10.nxduplicate of b5 for sanity 121
smoke_asm_b11.nxjust `.text` + label + 4 inst 121
smoke_asm_b12.nxjust `.globl main` + label + 4 inst 121
smoke_asm_b13.nxTwo `.text` directives, label, 4 inst. (Two-directive pattern test.) 121
smoke_asm_b14.nx.text + .globl main, NO label between, 4 inst 121
smoke_asm_b15.nxarg name DIFFERS from label 121
smoke_asm_b16.nxdirectives + label + 5 inst 121
smoke_asm_b17.nx1 directive + label + 5 inst 121
smoke_asm_b18.nxdirectives + label + 4 inst, but use a longer label name 121
smoke_asm_b19.nxb11 (which works) plus one more `nop` 121
smoke_asm_b2.nx111
smoke_asm_b20.nxjust li a1, 40 121
smoke_asm_b21.nxtest22 with ret -> nop 121
smoke_asm_b22.nxtest22 with li -> mv (so 4 inst, all reg-reg or reg-imm-reg) 131
smoke_asm_b3.nx111
smoke_asm_b4.nx4 instructions, no directives, no label. 121
smoke_asm_b5.nx4 instructions WITH label. 121
smoke_asm_b6.nxdirectives + label + addi only (1 inst expected) 121
smoke_asm_b7.nxdirectives + label + addi + ret (2 inst expected) 121
smoke_asm_b8.nxdirectives + label + addi + sd + ret (3 inst expected) 121
smoke_asm_b9.nxdirectives + 4 inst NO label 121
smoke_asm_d1.nxDiagnostic: which instructions actually got emitted in test22? 181
smoke_asm_d10.nxDump bytes near 53-67 by index to see what's there. 71
smoke_asm_d2.nxReturn byte[4] (second instruction's first byte). 121
smoke_asm_d3.nxReturn byte[8] (third instruction's first byte). 121
smoke_asm_d4.nxexit code is u8 anyway, but let's 161
smoke_asm_d5.nxReach into Asm to see pass 1 cur_addr vs pass 2 out_pos. 391
smoke_asm_d6.nxDrive the assembler with a manually-built byte buffer, to rule 581
smoke_asm_d7.nxPure string-literal sanity check. Same string as test22. 101
smoke_asm_d8.nxDump byte at position 60 of the literal. 71
smoke_asm_d9.nxDump byte at position 63 of the literal (where strlen stops). 71
smoke_asm_test.nxrun nxasm_v2 on a small RV64 asm snippet + assert 171
smoke_asm_test10.nx.text without newline. 141
smoke_asm_test11.nx.byte directive (specifically handled). 141
smoke_asm_test12.nxaddi with negative immediate. 141
smoke_asm_test13.nxsd with memory operand format. 141
smoke_asm_test14.nxprogressively larger test. 171
smoke_asm_test15.nxjust 2 consecutive li instructions. 171
smoke_asm_test16.nx.globl with operand. 171
smoke_asm_test17.nxwhat breaks when adding label? 171
smoke_asm_test18.nx.text then label. 171
smoke_asm_test19.nx2 directives + label. 171
smoke_asm_test2.nxminimal assembly test. 161
smoke_asm_test20.nxadd addi with negative imm. 171
smoke_asm_test21.nxadd sd after addi. 171
smoke_asm_test22.nxfull test14 with an additional `ret` final. 141
smoke_asm_test23.nxprint emitted bytes. 361
smoke_asm_test24.nxtest22 MINUS label. 141
smoke_asm_test25.nxdirectives + label + 3 insts (drop li). 141
smoke_asm_test26.nxlike test22 but reorder: ret before li. 141
smoke_asm_test3.nxadd directive + label. 151
smoke_asm_test4.nxjust label + li + ret. 151
smoke_asm_test5.nxjust .text directive. 151
smoke_asm_test6.nxlike test5 but trailing space before newline. 151
smoke_asm_test7.nxliterally just .text + ret. 171
smoke_asm_test8.nxjust .text, no mnemonic. 171
smoke_asm_test9.nxempty source. 131
smoke_call.nxverify a function call returns its value through the chain. 122
smoke_codegen_bug.nxMinimal repro for the nested-if codegen bug: 281
smoke_dom_inspect.nxProbe dom_test to see what b4.idom actually is. 301
smoke_elf_minimal.nxMinimal write_elf test: 4 bytes of code, write to stderr (fd 2). 121
smoke_exit42.nxminimal RV64 sovereign smoke test. 141
smoke_imports.nxtest import + tok_at-like memory layout. 171
smoke_lex2.nxlex two tokens. 141
smoke_lex3.nxlex multiple tokens. 141
smoke_lex4.nxlarger input, exercise lex_string + lex_number paths. 141
smoke_lex5.nxexact lex_test source, but no token verification. 141
smoke_lex6.nxlex + read first tok kind. 151
smoke_lex7.nxexact lex_test logic. 281
smoke_lex_min.nxminimal lex_source call. 171
smoke_loop.nxexercise a while loop + struct field write inside. 201
smoke_mmap.nxverify sys_mmap works in our RV64 ELF chain. 151
smoke_nxasm_demo.nxTake nxc2's actual asm output for a simple program and try to 221
smoke_nxasm_demo2.nxSame as smoke_nxasm_demo.nx but with the full directive header 161
smoke_nxc_pipeline.nxReplay nxc.nx's pipeline on the baked-in demo, reporting at 731
smoke_nxc_pipeline10.nxPipeline through stage 3 only, then write_elf with fresh code. 511
smoke_nxc_pipeline11.nxJust lex+parse, no opt/regalloc/emit, then write_elf. 201
smoke_nxc_pipeline12.nxlex+parse+opt only. 281
smoke_nxc_pipeline13.nxlex+parse+opt+regalloc. 411
smoke_nxc_pipeline14.nxReport f.n_values after parse+opt for the demo. 191
smoke_nxc_pipeline15.nxSame as pipeline13 but allocate huge locs to rule out overflow. 421
smoke_nxc_pipeline2.nxSame as smoke_nxc_pipeline.nx but skip the crt0 stub to see if 591
smoke_nxc_pipeline3.nxInspect m.n_functions after parse_module. 211
smoke_nxc_pipeline4.nxTry simpler source: no __syscall, just a constant return. 211
smoke_nxc_pipeline5.nxTry minimal source matching parse_test's expectations. 211
smoke_nxc_pipeline6.nxInspect tokens generated by lex_source for `func f() { return 42 }`. 231
smoke_nxc_pipeline7.nxAdd stage 5 (write_elf) to the pipeline replay. Writes to fd 3 641
smoke_nxc_pipeline8.nxSame imports as nxc.nx but ONLY call write_elf, skip all the 261
smoke_nxc_pipeline9.nxPipeline first, but call write_elf with a FRESH code buffer 571
smoke_regalloc_min.nxMinimal regalloc invocation: build a Function with NO values 331
smoke_regalloc_min2.nxRegalloc on a 3-value function: const+const+add+ret. 331
smoke_regalloc_min3.nxRegalloc on 1-value function: const, return it. 311
smoke_regalloc_min4.nx2-value function: 2 consts. 311
smoke_regalloc_min5.nx3 consts, no binop. 281
smoke_regalloc_min6.nxisolate whether binop alone crashes. 291
smoke_regalloc_min7.nxBuild a binop, then INSPECT the IR fields directly without 301
smoke_regalloc_step.nxReplay regalloc_function step-by-step on a binop function, 761
smoke_repro.nxminimal repro of codegen bug. 412
smoke_repro2.nxcloser to the lex_ident_or_kw shape. 454
smoke_repro3.nxadds the text[i] = c style write. 495
smoke_repro4.nxmatch Tok's 12-field layout + lex_ident_or_kw shape. 765
smoke_str_a.nx64-byte string (no terminator counted). 101
smoke_str_arg.nxpass a string literal to a function, read first byte. 132
smoke_str_b.nx65-byte string. 91
smoke_str_c.nx100-byte string. 91
smoke_str_index.nxstring indexing via *u8. 151
smoke_struct.nxstruct alloc + field write/read. 171
smoke_write.nxverify sys_write to stdout works. 141