chore: prepare release v0.33.0
Release / build (amd64, linux) (push) Successful in 49s
Release / build (arm64, linux) (push) Successful in 43s
Release / build (loong64, linux) (push) Successful in 46s
Release / build (riscv64, linux) (push) Successful in 45s
Test / vet (push) Successful in 47s
Release / release (push) Successful in 18s
Test / test (push) Successful in 2m39s
Test / build (push) Successful in 43s

This commit is contained in:
2026-09-14 23:36:19 +02:00
parent 40476546df
commit fff9f75595
6 changed files with 101 additions and 6 deletions
+12
View File
@@ -237,6 +237,18 @@ STP+SUB for large frames) and SB/global symbol references (ADRP+ADD pairs with
R_ADDRARM64 relocations). Like the other encoders it is validated
byte-for-byte against `GOARCH=arm64 go tool asm`.
On top of the per-architecture encoders, every framed function carries the
**stack-split guard**: the prologue check against `g.stackguard0` (small,
medium and large frame classes, the medium and large classes materialising
their offset through the architecture's temporary register and the large
class adding the SP-underflow branch) and the trailing morestack block
(save the link register, `CALL runtime.morestack_noctxt`, jump back to the
function entry). The auto-NOSPLIT rule, the frame classes, the large-frame
prologue and epilogue forms and the tail calls match the toolchain's
`stacksplit` and `preprocess` output byte for byte; a parity suite
assembles kernel files with gasm and the installed `go tool asm` and diffs
the bytes on all four architectures.
On top of the encoder, `Assemble` walks a parsed `TEXT` body, converts each
operand to an encoder operand, and lays the instructions out so local labels
resolve to relative jump offsets: jumps start in the short (rel8) form and
+18 -1
View File
@@ -22,7 +22,7 @@ one token per line. FILE may be `-` to read standard input.
Parse FILE and report syntax errors on stderr. On success, prints how
many declarations and TEXT functions the file contains.
## `gasm fmt [-w] [path...]`
## `gasm fmt [-w|-l|-d] [path...]`
Canonicalise the formatting of Plan 9 assembly sources: indentation,
operand spacing, per-function mnemonic alignment, and blank-line layout.
@@ -30,6 +30,8 @@ operand spacing, per-function mnemonic alignment, and blank-line layout.
| Flag | Description |
|------|-------------|
| `-w` | Write result to the source file (default: print to stdout) |
| `-l` | List files whose formatting differs, one per line; write nothing |
| `-d` | Print a unified diff of the canonical formatting instead |
With no arguments, or with a directory argument, every `.s` file below
it is reformatted in place and the names of changed files are listed
@@ -62,6 +64,21 @@ Assemble FILE to machine code (amd64, arm64, riscv64, loong64).
| `-p` | Package path (required for `--format goobj`) |
| `-o` | Write output to file (default: hex dump to stdout) |
## `gasm dis [-a arch] <file>`
Disassemble machine code to instruction text (via `golang.org/x/arch`).
With a `.s` file, the file is assembled first and the listing follows the
real layout: one block per `TEXT` function, local labels printed at their
offsets. The architecture comes from the file name suffix, or from `-a`.
With any other file, or `-` for standard input, the bytes are
disassembled linearly and `-a` selects the architecture (amd64, arm64,
riscv64 or loong64).
| Flag | Description |
|------|-------------|
| `-a` | Architecture for raw input without a `_arch.s` name |
## `gasm verify [flags] <file.s>`
Assemble FILE, map it into executable memory, and run dynamic checks.