1
0
Fork
You've already forked rvasm
0
RISC-V assembler
  • C 81.9%
  • Shell 7.8%
  • Assembly 6.6%
  • Makefile 3.7%
2026年05月21日 16:13:11 +02:00
src improve error messages 2026年05月21日 16:13:11 +02:00
test
.gitignore
LICENSE
Makefile improve error messages 2026年05月21日 16:13:11 +02:00
README.md build: drop -static flag 2026年05月20日 16:51:17 +02:00

rvasm

A minimalist, fast, format-driven RISC-V cross-assembler written in clean C89. Zero dependencies, zero bloat, and highly portable.

Features

Current Target Support

  • Architectures: RV32I & RV64I base integer instruction sets.
  • Format-Driven Pipeline: Safe, type-verified operand constraint checking.

Planned Features

  • Pseudo-Instructions: Syntax sugar translation layer (li, la, mv, j, ret).
  • Extensions: Complete M (Multiplication/Division), A (Atomic), F/D (Floating Point), and C (Compressed) ISA matrices.
  • Relocation Operators: High/Low bit-mask modifiers (%hi and %lo).
  • Section Separation: True memory segment partitioning (.text, .data, .bss).
  • Production Deployment: Upgrading from raw flat binary generation to native ELF object container formats.

Building from Source

The only prerequisite to compile rvasm is a standard C compiler and standard system libc frames.

To compile a native, dynamically linked optimized binary:

make

Running the Automated Test Suite

The toolchain comes guarded by a self-calibrating automated test harness that validates generated machine bits and handles expected failure states:

make suite

Usage

Usage: ./rvasm [options] <file.s>
Options:
 -b <32|64> Specify target architecture bit width (default: 32)
 -o <filename> Specify the output binary payload filename (default: out.bin)
 -v Enable verbose compilation diagnostics
 -h Show this help menu summary description