目录 ← 首页
CS61C

RV32I \"Green Card\"

This “green card” is longer than one page, due to the accessible web format. We compensate by supplementing these lookup tables with references to the official ISA and/or assembly manuals where appropriate. For a two-sided reference card with the same information, check out the PDF reference card on our course website.

Reference: The official RISC-V unprivileged ISA specification, RV32I Base Integer Instruction Set, Version 2.1. In practice, the ASM Manual will have everything you need.

RV32I Base Integer Instruction Set

Arithmetic

Memory

Control

Other

Pseudoinstructions

See the ASM Manual and this 2024 GitHub issue discussion.

Register Convention

See the table from the ASM Manual, which we find the most useful. Other references include the RISC-V ELF psABI Specification (RISC-V Calling Conventions), which supercedes Volume I, V2.1, 2014: Chapter 18 Calling Convention.

Instruction Format Types

Footnotes

  1. Out of scope: gp (global pointer, used to store a reference to the heap) and tp (thread pointer, used to store separate stacks for threads). Consider these registers “off-limits”–using them violates register conventions! 2