• v0.12.0 Stable

    petrbalvin released this 2026-07-17 16:57:04 +00:00 | 268 commits to main since this release

    GOOBJ emission: gasm-assembled functions drop into a go build without the
    Go assembler.

    Added

    • asm: GOOBJ object output. gasm asm --format goobj -p <pkgpath>
      writes the Go toolchain's own object format — the one cmd/link consumes
      directly: the functions as non-package symbols qualified with the package
      path (exactly as cmd/asm records assembly symbols), the GLOBL data,
      one serialized FuncInfo per function (argument/frame sizes, the asm
      func flag, the start line, the file table) and the four pc-value tables
      (pcsp, pcfile, pcline, pcinline). The pcsp table carries the
      real stack deltas: the assembler now tracks every stack-adjustment
      boundary through the prologue (PUSHQ BP, SUBQ $frame, SP) and each
      RET's epilogue, so frame-pointer functions unwind correctly. The
      object preamble — the version-and-experiment header the linker compares
      verbatim — is captured from the installed go tool asm, so the output is
      always consistent with the toolchain that links it.
    • asm: relocations against file-local GLOBL symbols become R_PCREL
      entries in the GOOBJ output, with the instruction's displacement field
      left zero for the linker to fill (as cmd/asm leaves it).

    Fixed

    • parser: 64-bit DATA literals above MaxInt64
      (DATA mask<>+8(SB)/8, $0x800f…) parse as unsigned and keep their bit
      pattern, instead of being rejected as non-integer.

    Verified

    • End-to-end: a gasm-emitted GOOBJ swapped into a go build in place of
      the toolchain's assembly object links and runs with output identical to
      the baseline binary (stack-argument calls and a GLOBL relocation
      resolved by the Go linker). All 17 go-flac AVX2 kernel functions emit as
      a GOOBJ that go tool nm reads back with every symbol intact.
    Downloads