w6c: delete unwired backend pass seams

This commit is contained in:
2026-08-09 04:13:07 +09:00
parent a3d7f61792
commit 2a03cfbfa4
8 changed files with 3 additions and 36 deletions

View File

@@ -2,5 +2,5 @@ w6c — amd64 compiler. Reads `.ww`, writes Plan 9 amd64 assembly (`.s`).
- Plan 9 C style: tabs, K&R, short names. Mirror `ref/plan9front/sys/src/cmd/8c/` and `ref/plan9front/sys/src/cmd/cc/`. Do not invent new data shapes — reuse `Prog`/`Adr`/`Node`/`Sym`/`Type` conventions.
- Frontend (lex, parse, check) lives in `../wcc/` and links as `libwcc.a`. This directory owns codegen only.
- `gc.h` is the per-target header (Plan 9 cc convention). `cgen.c` walks the AST into `Prog` list; `txt.c` prints it. `peep.c` is peephole. `reg.c` is the register allocator. `swt.c` is switch lowering.
- `gc.h` is the per-target header (Plan 9 cc convention). `cgen.c` performs the current AST lowering into a `Prog` list, including switch lowering; `txt.c` emits the assembler text. There is no peephole or register-allocation pass yet.
- The text output must be readable by `w6a` (the amd64 assembler under `../w6a/`). When in doubt about syntax, run `w6a` on the output.