go-asmgen

Ergonomic generation of Go-compatible Plan 9 assembly for all six 64-bit Go targets — amd64, arm64, riscv64, loong64, ppc64le and s390x — one uniform builder, encoding delegated to cmd/asm.

emits text, not bytes cmd/asm encodes ABI0 go vet asmdecl-checked 100% test coverage
Documentation GitHub

avo encodes amd64 instruction bytes itself — which is exactly what makes extending it to new ISAs expensive. go-asmgen instead emits the same Plan 9 assembly text a human would hand-write and lets the Go toolchain assembler cmd/asm encode it. Each new architecture needs only an ABI layout model and a thin instruction-emit surface.

amd64 ready

Yes, amd64 too — for one uniform builder across every target. SSE float moves, sign/zero-extending sub-word loads. NEON/SSE SIMD via Raw.

AX.. / X0..

arm64 ready

All ABI0 scalars + struct/slice/string aggregates, and NEON packed ops. The reference target; runtime-proven natively.

R0.. / F0..

riscv64 ready

Same ABI0 layout as arm64, a different move table (MOV/MOVF/MOVD). Runtime-proven under qemu-user.

X0.. / F0..

loong64 ready

LoongArch 64-bit — same shared ABI0 layout, a third move table (MOVV/MOVF/MOVD). Runtime-proven under qemu-user.

R0.. / F0..

ppc64le ready

POWER little-endian — same shared ABI0 layout, move table MOVD/FMOVS/FMOVD. VSX packed ops via Raw. Runtime-proven under qemu-user.

R0.. / F0..

s390x ready

IBM Z, big-endian — same shared ABI0 layout, move table MOVD/FMOVS/FMOVD. Vector-facility ops via Raw; the big-endian path is exercised. Runtime-proven under qemu-user.

R0.. / F0..

All six targets share one ABI0 layout model — scalars, struct/slice/string aggregates, fixed-size arrays, and SIMD (SSE, NEON, RVV, LSX, VSX, s390x vector) — differing only in their move tables. Every emitted name+offset(FP) is cross-checked against the Go declaration by go vet and run for real: natively on amd64 and arm64, under qemu-user for riscv64, loong64, ppc64le and s390x (the s390x run exercising the big-endian path).