• v0.28.0
    Test / vet (push) Successful in 44s
    Release / build (amd64, linux) (push) Successful in 39s
    Release / build (arm64, linux) (push) Successful in 38s
    Release / build (loong64, linux) (push) Successful in 39s
    Release / build (riscv64, linux) (push) Successful in 39s
    Test / test (push) Successful in 1m58s
    Release / release (push) Successful in 18s
    Test / build (push) Successful in 37s
    Stable

    petrbalvin released this 2026-08-03 17:42:05 +00:00 | 240 commits to main since this release

    RISC-V encoder: full RV64IMAFDC instruction set with RVC compression, MOV
    pseudo-instruction, SB/global symbol references, ELF64 object emission, and
    ground-truth verification against GOARCH=riscv64 go tool asm.

    Added

    • RISC-V encoder — RV64I, RV64M, RV64A, RV64F/D, FMA, CSR, JALR.
    • MOV pseudo-instruction — load, store, reg-to-reg, immediate, frame mapping.
    • RVC compression — 22 compressed instruction types (C.LDSP, C.SDSP, C.FLDSP,
      C.FSDSP, C.ADDI, C.LI, C.LUI, C.ADDIW, C.MV, C.ADD, C.SUB, C.XOR, C.OR, C.AND,
      C.SLLI, C.SRLI, C.SRAI, C.ANDI, C.BEQZ, C.BNEZ, C.J, C.JR).
    • SB/global symbols — MOV $sym(SB), MOV sym(SB), MOV rd, sym(SB)
      encoded as AUIPC pairs with R_RISCV_PCREL_HI20/LO12 relocations.
    • GLOBL/DATA — data section layout in AssembleFileRISCV.
    • ELF64 emission — gasm asm --format elf produces EM_RISCV objects
      (.text, .data, .symtab, .rela.text).
    • gasm verify --ground-truth — byte-exact comparison against
      GOARCH=riscv64 go tool asm.
    • gasm verify --profile — function layout listing for RISC-V.
    • CALL — AUIPC + JALR pair encoding.

    Fixed

    • Parser: bare-number offset before (SP) no longer misidentified as pseudo.
    • MOV: MOV $sym(FP/SP), rd now returns an explicit error instead of silent fallback.
    • RVC: C.LDSP/C.SDSP/FLDSP/FSDSP immediate encoding now matches Go toolchain
      (bit-interleaved format).

    Verified

    • 118 RISC-V tests, asm coverage 83.3%.
    • Ground-truth: C.LDSP, C.SDSP, C.FLDSP, C.FSDSP byte-exact vs Go toolchain.
    Downloads