feat(gasm): audit-instructions for arm64, riscv64 and loong64

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-08-30 21:42:12 +02:00
parent 75bd83fd52
commit 57c0ca8b09
4 changed files with 197 additions and 37 deletions
+11 -7
View File
@@ -154,14 +154,18 @@ each function's labels, their offsets, and the block boundaries. This is
the static structure; for runtime execution counts, use `gasm verify
--fuzz` which exercises the code paths.
## `gasm audit-instructions`
## `gasm audit-instructions [amd64|arm64|riscv64|loong64]`
Compare the gasm amd64 encoder against the installed `go tool asm` and
print the diff: superset encodings (gasm-only spellings, shippable via
`gasm asm --format goobj`), known-but-unencodable names (the encoder
backlog) and go-only names (feature gaps). The Go side is probed
black-box with a battery of operand shapes per mnemonic, so the audit
tracks whatever toolchain `go env GOROOT` provides.
Compare the gasm encoder for the given architecture (default amd64)
against the installed `go tool asm` and print the diff: superset
encodings (gasm-only spellings, shippable via `gasm asm --format goobj`),
known-but-unencodable names (the encoder backlog) and go-only names
(feature gaps). The Go side is probed black-box with a battery of operand
shapes per mnemonic, so the audit tracks whatever toolchain
`go env GOROOT` provides. On non-amd64 architectures the backlog is an
over-approximation: a name counts as encodable only when a probe shape
assembles cleanly, so a name whose real forms the battery misses lands
in the backlog.
## `gasm scaffold differential <file.s>`