Register Reference

GP registers

Number Name Preserved by Description
0 $zero -------- Hardwired to zero
1 $at caller Assembler temporary (used for pseudo-ops)
2, 3 $v0, $v1 caller Function return values
4-7 $a0-$a3 caller Function arguments
8-15 $t0-$t7 caller Temporaries
16-23 $s0-$s7 callee Saved temporaries
24, 25 $t8, $t9 caller Temporaries
26, 27 $k0, $k1 -------- Reserved for kernel
28 $gp callee Global pointer
29 $sp callee Stack pointer
30 $fp or $s8 callee Frame pointer or saved temporary
31 $ra callee Return address