An immediate is a constant operand stored inside the instruction word itself, such as the 1 of addi a2, t1, 1. In RV32I most immediates have 12 bits, read signed: to .
| register | ABI name | role | preserved across calls |
|---|---|---|---|
x0 | zero | always 0 | — |
x1 | ra | return address | no |
x2 | sp | stack pointer | yes |
x3, x4 | gp, tp | global and thread pointers | not allocated |
x5–x7, x28–x31 | t0–t6 | temporaries | no (caller-saved) |
x8, x9, x18–x27 | s0–s11 | saved registers | yes (callee-saved) |
x10–x17 | a0–a7 | arguments; a0, a1 results | no (caller-saved) |