• v0.4.0 56ecc39539

    v0.4.0 Stable

    petrbalvin released this 2026-07-09 13:56:03 +00:00 | 276 commits to main since this release

    The standalone assembler reaches the whole go-flac AVX2 kernel: static
    symbols assemble, and all 17 kernel functions now match the Go toolchain's
    machine code byte for byte.

    Added

    • asm: file-level assembly — AssembleFile turns a parsed file into an
      Image: the function bodies in source order followed by a data section
      built from the file's GLOBL/DATA directives (each symbol 16-aligned).
    • asm: static-symbol (SB) operands — mask<>(SB) references encode as
      RIP-relative loads with a patched disp32, resolved against the image layout
      so the output is self-consistent and position-independent. External
      (non-file-local) symbols are rejected with a clear error: they need
      object-file emission.
    • gasm asm prints the data section and symbol map alongside the functions
      and writes the whole image (code + data) with -o.

    Verified

    • All 17 functions of the go-flac avx2_amd64.s kernel assemble
      byte-identically to the Go toolchain's machine code; the only differing
      bytes are the displacements of the two VMOVDQU mask24<>(SB), X15 loads,
      which the Go linker fills at link time and gasm resolves within its own
      image (checked to reach the right constant bytes).
    Downloads