-
v0.1.0 Stable
released this
2026-07-06 07:49:50 +00:00 | 279 commits to main since this releaseInitial release — the Phase 1 foundation.
Added
token,lexer,ast,parser: a hand-written, error-tolerant front end
for Plan 9 assembly. The lexer splices C-preprocessor line continuations
(\before a newline) so multi-line#definemacros parse as one opaque
directive. Validated against the production AVX2/AVX-512 kernels in
go-libraries/go-flacand the Go runtime'ssrc/runtime/*.sfor all four
architectures, with zero parse errors.arch: register files and complete instruction tables for amd64,
arm64, riscv64 and loong64, with the middle-dot symbol separator and static
(<>) symbols. Instruction names are generated from the Go toolchain's own
assembler source (just gen) — theanamesopcode lists plus the common
opcodes and the per-architecture front-end aliases (arm64B/BL, the
.P/.Waddressing suffixes, loong64JAL, the x86 conditional-jump
spellings) — so every mnemonic the real assembler accepts is recognised.lint: conservative rules —unknown-instruction,operand-count,
undefined-label,duplicate-label,missing-ret,
missing-textflag-include,abi-argsizeandunreachable-code. Macro
invocations are recognised (in-file#definenames and underscore
identifiers) and the label/RET heuristics are suppressed in macro-using
files.abi-argsizeparses the// funcsignature with the Go parser and
checks the declared TEXT argument size against Go's ABI0 layout;
unreachable-codeflags dead code afterRET, suppressed where reachability
is undecidable (PC-relative jumps, register-indirect branches,#ifdef).
Register liveness is computed by dataflow over the control-flow graph (basic
blocks, def/use, iterative backward iteration) and drivesregister-clobber,
an audit that flags a callee-saved register written but never saved/restored.
funcdata-pcdatavalidates the structure ofFUNCDATA/PCDATAdirectives.
Zero error-severity diagnostics across the 90-file Go runtime corpus and the
production go-flac kernels (theregister-clobberaudit additionally reports
the go-flac kernels' unsaved callee-saved register use for review).format: an idempotent canonical formatter (operand spacing and per-function
mnemonic alignment) that preserves comments and round-trips through the
parser.lsp: a Language Server Protocol server over stdio providing completion,
hover documentation, document symbols, publish-diagnostics and semantic-token
highlighting.asm: a standalone amd64 (x86-64) assembler — an instruction encoder (REX/
ModR-M/SIB/displacement/immediate plus the scalar instruction set, and VEX/
AVX2 SIMD across three operand forms — NDS, reg/rm and immediate-shift —
covering the bulk of the integer SIMD set) validated by round-trip decoding
againstgolang.org/x/arch, and an assembler that drives the parser's AST
into the encoder with local-label resolution andFP/SPframe mapping
(plus Go prologue/epilogue generation), producing output byte-identical to the
Go assembler for the supported operand forms.cmd/gasm: thegasmbinary withtokens,parse,fmt,lint,asm
andlspsubcommands._gen: the generator that rebuilds the architecture instruction tables from
the Go toolchain source (just gen).
Downloads