All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Immediate?

Definition 10.3 University Computer Science — Year 2 · Chapter 10 — Assembly Language and the Calling Convention

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: −2048-2048 to 20472047.

registerABI namerolepreserved across calls
x0zeroalways 0—
x1rareturn addressno
x2spstack pointeryes
x3, x4gp, tpglobal and thread pointersnot allocated
x5–x7, x28–x31t0–t6temporariesno (caller-saved)
x8, x9, x18–x27s0–s11saved registersyes (callee-saved)
x10–x17a0–a7arguments; a0, a1 resultsno (caller-saved)
The register file under its ABI names, the names programs use. The last column is the calling convention of Section 10.5.
Read in context →