-
v0.3.0 Stable
released this
2026-07-08 10:51:35 +00:00 | 277 commits to main since this releaseThe assembler reaches byte-identical parity with the Go toolchain on the
production go-flac AVX2 kernels: every one of the 15 kernel functions that
avoid global symbols now assembles to exactly the Go assembler's bytes (the
two holdouts load a file-local constant throughSBand wait on relocation
support).Added
asm: the scalar instruction families the kernels use —CMOVccand
SETcc(conditions spelled exactly like the jumps),LZCNT/TZCNT
(legacyF3 0F BD/BC), the sign/zero-extending moves (MOVBLZX,MOVBQZX,
MOVWLZX,MOVWQZX,MOVWLSX,MOVLQSX),CVTSL2SD/CVTSQ2SD(the
legacy SSE encoding, as the Go assembler emits it), the traditional
three-operandIMUL3{W,L,Q}, and the variable-count vector shifts
(VPSRLQ X0, Y8, Y8— the count in an XMM register or memory takes the
ordinary NDS form).asm: jump relaxation — jumps start in the short (rel8) form and
expand to rel32 when the settled displacement does not fit, iterating the
layout to a fixed point (CALL is always rel32).asm: jump-to-jump folding — a conditional jump to a label whose only
instruction is an unconditional jump is redirected to the ultimate
target, replicating the Go toolchain's linker, which chases such chains
before it encodes branches.parser: leading negative displacements with a base and index
(LEAQ -4(DX)(R9*4), R9) parse into a fully populated address.
Fixed
asm:CMPwith a register or memory operand computed second − first
instead of first − second, silently inverting every condition that followed
(CMPQ SI, R10; JGEtested R10 ≥ SI). The encoding now always records
first − second —CMP r/m, rwith the first operand in r/m,CMP r, r/m
with the first operand in reg — and is byte-identical to the Go assembler.asm: register-to-registerMOVnow uses ther/m ← ropcode (reg =
source), the Go assembler's choice; the output is byte-identical.
Downloads