Register Definitions
Integer Registers
Register |
ABI Name |
Description |
Saver |
---|---|---|---|
x0 |
zero |
Hard-wired zero |
|
x1 |
ra |
Return address |
Caller |
x2 |
sp |
Stack pointer |
Callee |
x3 |
gp |
Global pointer |
|
x4 |
tp |
Thread pointer |
|
x5 |
t0 |
Temporary/alternate link register |
Caller |
x6 |
t1 |
Temporaries |
Caller |
x7 |
t2 |
Temporaries |
Caller |
x8 |
s0/fp |
Saved register/frame pointer |
Callee |
x9 |
s1 |
Saved register |
Callee |
x10 |
a0 |
Function arguments/return values |
Caller |
x11 |
a1 |
Function arguments/return values |
Caller |
x12 |
a2 |
Function arguments |
Caller |
x13 |
a3 |
Function arguments |
Caller |
x14 |
a4 |
Function arguments |
Caller |
x15 |
a5 |
Function arguments |
Caller |
x16 |
a6 |
Function arguments |
Caller |
x17 |
a7 |
Function arguments |
Caller |
x18 |
s2 |
Saved registers |
Callee |
x19 |
s3 |
Saved registers |
Callee |
x20 |
s4 |
Saved registers |
Callee |
x21 |
s5 |
Saved registers |
Callee |
x22 |
s6 |
Saved registers |
Callee |
x23 |
s7 |
Saved registers |
Callee |
x24 |
s8 |
Saved registers |
Callee |
x25 |
s9 |
Saved registers |
Callee |
x26 |
s10 |
Saved registers |
Callee |
x27 |
s11 |
Saved registers |
Callee |
x28 |
t3 |
Temporaries |
Caller |
x29 |
t4 |
Temporaries |
Caller |
x30 |
t5 |
Temporaries |
Caller |
x31 |
t6 |
Temporaries |
Caller |
Floating Point Registers
Register |
ABI Name |
Description |
Saver |
---|---|---|---|
f0 |
ft0 |
FP temporaries |
Caller |
f1 |
ft1 |
FP temporaries |
Caller |
f2 |
ft2 |
FP temporaries |
Caller |
f3 |
ft3 |
FP temporaries |
Caller |
f4 |
ft4 |
FP temporaries |
Caller |
f5 |
ft5 |
FP temporaries |
Caller |
f6 |
ft6 |
FP temporaries |
Caller |
f7 |
ft7 |
FP temporaries |
Caller |
f8 |
fs0 |
FP saved registers |
Callee |
f9 |
fs1 |
FP saved registers |
Callee |
f10 |
fa0 |
FP arguments/return values |
Caller |
f11 |
fa1 |
FP arguments/return values |
Caller |
f12 |
fa2 |
FP arguments |
Caller |
f13 |
fa3 |
FP arguments |
Caller |
f14 |
fa4 |
FP arguments |
Caller |
f15 |
fa5 |
FP arguments |
Caller |
f16 |
fa6 |
FP arguments |
Caller |
f17 |
fa7 |
FP arguments |
Caller |
f18 |
fs2 |
FP saved registers |
Callee |
f19 |
fs3 |
FP saved registers |
Callee |
f20 |
fs4 |
FP saved registers |
Callee |
f21 |
fs5 |
FP saved registers |
Callee |
f22 |
fs6 |
FP saved registers |
Callee |
f23 |
fs7 |
FP saved registers |
Callee |
f24 |
fs8 |
FP saved registers |
Callee |
f25 |
fs9 |
FP saved registers |
Callee |
f26 |
fs10 |
FP saved registers |
Callee |
f27 |
fs11 |
FP saved registers |
Callee |
f28 |
ft8 |
FP temporaries |
Caller |
f29 |
ft9 |
FP temporaries |
Caller |
f30 |
ft10 |
FP temporaries |
Caller |
f31 |
ft11 |
FP temporaries |
Caller |