tinycodinglm / asm /asm-riscv.jsonl
winapiadmin's picture
Upload folder using huggingface_hub
1f3a244 verified
|
Raw History Blame
981 Bytes
opencode trace
System You are an expert software engineer.

You are an expert software engineer.

User

Explain RISC-V assembly architecture

Assistant

RISC-V: open-source ISA. RV32I (32-bit), RV64I (64-bit), RV128I.

Registers: x0-x31 (ABI names: zero, ra, sp, gp, tp, t0-t6, s0-s11, a0-a7). x0 hardwired to zero.

Fixed-width 32-bit instructions. R-type (register), I-type (immediate), S-type (store), B-type (branch), U-type (upper immediate), J-type (jump).

Instructions: ADD/SUB, AND/OR/XOR, SLL/SRL/SRA, LW/LH/LB/SW/SH/SB, BEQ/BNE/BLT/BGE, JAL/JALR, LUI/AUIPC.

M extension: MUL/MULH/MULHSU/MULHU/DIV/DIVU/REM/REMU. F/D extensions: floating point.

Privilege levels: M (machine), S (supervisor), U (user). CSR instructions: CSRR/CSRW/CSRS.