Summary of MIPS Registers

 

Number Name Comments
0  $zero  constant 0
1  $at  assembler temporary (not preserved across function call)
2
3
 $v0 
 $v1 
results of a function (not preserved across function call)
results of a function
4
5
6
7
 $a0 
 $a1 
 $a2 
 $a3 
argument 1 (not preserved across function call)
argument 2
argument 3
argument 4
8
.
.
.
15
 $t0 
.
.
.
 $t7 
temporary (not preserved across function call)
.
.
.
temporary (not preserved across function call)
16
.
.
.
23
 $s0 
.
.
.
 $s7 
saved temporary (preserved across function call)
.
.
.
saved temporary (preserved across function call)
24
25
 $t8 
 $t9 
temporary (not preserved across function call)
temporary (not preserved across function call)
26
27
 $k0 
 $k1 
reserved for OS kernel (not preserved across function call)
reserved for OS kernel
28
29
30
31
 $gp 
 $sp 
 $fp 
 $ra 
global pointer
stack pointer
frame pointer
return address (set by jal, not preserved)

There is also a special PC (program counter) register, to which programmers do not have direct access.

View Final Summary of COMP 230 MIPS Instructions (descriptions)
View Assembly ←→ Machine Instruction Mappings (organized by function)
View Assembly ←→ Machine Instruction Mappings (organized by format type)