:- 32 General-Purpose -:
:- Registers -:


back...

R3000 General-Purpose Registers

 Register No. 
 Macro (1) 
 Macro (2)   Assembler  Description
0 R_ZERO R_R0 zero/$0 The contents of $0 register is always 0.
1 R_AT R_R1 at Reserved for the assembler.
This is the assembler temporary register,
which is used in background.
2-3 R_V0-1 R_R2-3 v0-1 Values returned by functions. If a function
returns more than 2x32 bit values than
memory has to be used. (later more)
4-7 R_A0-3 R_R4-7 a0-3 Function arguments. This register hold
the first function paramters. Parallel to this
the same parameters are stored on stack.
(later more)
8-15 R_T0-7 R_R8-15 t0-7 t0-t9 can be used in functions without
carrying about the contents of them before
the function was entered and after the
function is left.
16-23 R_S0-7 R_R16-23 s0-7 If this register are used in functions, their
contents has to be saved before.
It must be guaranted that the contents is
the same after the function is left, as
before it was entered.
24-25 R_T8-9 R_R24-25 t8-9 See 8-15.
26-27 R_K0-1 R_R26-27 k0-1 Reserved for the kernel
28 R_GP R_R28 gp Global Pointer
29 R_SP R_R29 sp Stack Pointer
30 R_FP R_R30 fp Frame Pointer
31 R_RA R_R31 ra This register stores the return address at
which the programm will continue when
the function is left. (jr ra). If a function is
calling another function the contents of ra
must be saved on stack before calling,
otherwise lost in space. (crash!)
See User Guide on page 13/14 for more informations.


back...