In the MIPS assembly language there are registers that need to be used a specific way. There are also 31 of them (Well, 31, GPR (General Purpose Registers)) just like PPC. Here they are:
zero - Always holds the value 0
at - N/A
v0 - Holds a function return value
v1 - Holds a function return value
a0 - Holds a function argument
a1 - Holds a function argument
a2 - Holds a function argument
a3 - Holds a function argumnt
t0 - Holds a value, the value is reset when a "linking" command is ran
t1 - Holds a value, the value is reset when a "linking" command is ran
t2 - Holds a value, the value is reset when a "linking" command is ran
t3 - Holds a value, the value is reset when a "linking" command is ran
t4 - Holds a value, the value is reset when a "linking" command is ran
t5 - Holds a value, the value is reset when a "linking" command is ran
t6 - Holds a value, the value is reset when a "linking" command is ran
t7 - Holds a value, the value is reset when a "linking" command is ran
s0 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s1 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s2 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s3 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s4 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s5 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s6 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
s7 - Holds a value, this value is always kept in the register. You must "push" this onto the stack pointer to be able to use it.
t8 - Holds a value, the value is reset when a "linking" command is ran
t9 - Holds a value, the value is reset when a "linking" command is ran
k0 - N/A
k1 - N/A
gp - Holds the global pointer, all static memory addresses are an offset to this pointer.
fp - Points to the end of the stack
sp - Points to the start of the stack
ra - Holds the "return address". This is like the C/C++ statement "return;". When a function is called it puts the memory address after it (and it's delay slot, which is the address right after it, used to pass in function arguments) into the register ra, when when "jr ra" is ran (jump to address in ra, same as "return;") it will jump to code execution to the address in ra, thus "returning" from the function.
Anyway, I was wondering if the registers where the same in PPC, or if they are similar. Please shed some light on them, all I see is r0 - r31, and that gives me the idea that they are all temporary registers which is most likely not the case.
Thanks ! ^_^
This (http://wiird.l0nk.org/forum/index.php/topic,6555.0.html) guide by dcx2 has information about the registers.
You can find more guides here (http://wiird.l0nk.org/forum/index.php/topic,101.0.html).