From 970df7c32ad1335229423deac6f44d4706977737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Balv=C3=ADn?= Date: Sat, 29 Aug 2026 14:26:08 +0200 Subject: [PATCH] style(lint): drop duplicate rule code declaration --- docs/DECISIONS.md | 30 ++++++++++++++++++++++++++++++ lint/registers.go | 6 ++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index e85c161..0d8169a 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -32,3 +32,33 @@ The resolver is invoked automatically when `img.Externals` is non-empty; it runs `go list` as a subprocess (consistent with `toolchainObjectPreamble` which already calls `go tool asm`). All symbol data is cached per package for the lifetime of the GOOBJ emission. + +## 2026-08-29 tooling round + +- `lint abi0-register-args`: flags kernels whose `// func` parameters are + never read from the FP frame. Motivated by a real latent bug: kernels + reading arguments from registers pass every test while the autogenerated + `F.abi0` wrapper happens to leave the caller's register values intact, and + break on a toolchain upgrade. +- `lint nonportable-register-name`: the RAX/EAX register spellings are a gasm + extension; go tool asm rejects them, so files using them only link through + the gasm goobj path. +- `lint unencodable-instruction`: a mnemonic in the architecture table that + `asm.Encodable` rejects is flagged at edit time instead of failing at + assembly time. +- `audit-instructions`: black-box diff of the encoder against go tool asm. + As of this round the tables fully overlap on names; the audit exists to + catch drift in both directions (future supersets and future gaps). +- `scaffold differential`: generates the direct-call differential skeleton + (two independent seed sets, output and in-place buffer comparison) that a + pipeline-level fuzz can never replace. +- `verify --args`: scalar arguments for `-call`, closing the repro gap where + only buffers could be supplied. +- `debug --script/--timeout/--cover`: headless debugging with a watchdog + armed before the ptrace attach (untracing sandboxes hang the attach), and + label-level block coverage for the "did my test ever enter that branch" + question. +- Superset policy remains: gasm may accept spellings and encodings go tool + asm lacks, but such kernels ship only via `gasm asm --format goobj`; the + audit reports the superset surface. The register-alias superset is warned + about by lint because the default `go build` path cannot consume it. diff --git a/lint/registers.go b/lint/registers.go index 814fb63..7f28357 100644 --- a/lint/registers.go +++ b/lint/registers.go @@ -11,12 +11,10 @@ import ( "sourcedock.dev/petrbalvin/gasm-devkit/token" ) -// CodeNonportableRegister flags R/E-prefixed amd64 register spellings. -const CodeNonportableRegister = "nonportable-register-name" - // amd64WordNames are the canonical 64-bit register spellings of go tool asm: // the assembler has no RAX/EAX/RBX forms, and a file using them assembles -// under gasm but fails under the toolchain it must ship with. +// under gasm but fails under the toolchain it must ship with. The rule code +// (CodeNonportableRegister) is declared in lint.go. var amd64WordNames = map[string]string{ "AX": "AX", "BX": "BX", "CX": "CX", "DX": "DX", "SI": "SI", "DI": "DI", "BP": "BP", "SP": "SP",