assembly-riscv

Explain RISC-V assembly programming for RV32 and RV64 architectures.

159|20|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill assembly-riscv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: assembly-riscv
Source: https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv
Command: npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill assembly-riscv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance for understanding and writing RISC-V assembly code, enabling efficient low-level programming for embedded systems and high-performance computing.

Core Features & Use Cases

  • RISC-V ISA: Covers RV32/RV64 instruction sets, register conventions, and ABI.
  • Assembly Programming: Details basic instructions, function calls, and inline assembly with GCC/Clang.
  • Simulation & Debugging: Guides on using QEMU and GDB for RISC-V development.
  • Use Case: You need to optimize a critical function in an embedded system by writing it directly in RISC-V assembly, ensuring it adheres to the psABI calling convention.

Quick Start

Explain the RISC-V calling convention for RV64.

Frequently Asked Questions about assembly-riscv

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write inline RISC-V assembly in GCC or Clang?

Inline RISC-V assembly in GCC or Clang uses specific compiler constraints to insert low-level instructions directly into C code. This Skill provides guidance on writing inline assembly while adhering to register conventions and the psABI calling convention for RV32 and RV64 architectures.

What is the RISC-V psABI calling convention for RV64?

The RISC-V psABI calling convention for RV64 defines how functions receive arguments via specific registers and return values. This Skill details the register naming conventions and function call standards required to ensure your assembly code properly interfaces with compiled code.

How do I set up QEMU and GDB for RISC-V assembly simulation and debugging?

Setting up QEMU and GDB for RISC-V simulation involves configuring QEMU to emulate an RV32 or RV64 environment and attaching GDB for remote debugging. This Skill guides you through using these tools to simulate and step through your assembly code.

Does writing embedded systems assembly in RISC-V require knowing compressed instructions?

Writing optimized RISC-V assembly for embedded systems often requires using compressed instructions to reduce code size. This Skill covers compressed instructions alongside the standard RV32 and RV64 instruction sets to help you achieve performance-critical and space-efficient low-level development.

When should I use RISC-V assembly instead of C for embedded systems?

You should use RISC-V assembly instead of C when you need to optimize a critical function for maximum performance or precise hardware control in an embedded system. This Skill facilitates such low-level development by detailing instruction sets and calling conventions for direct assembly programming.