Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r0 his hardwired 0, always 0. at is a compiler reserved register, but otherwise can be thought of as being a temporary register. v0-v1 are value returning registers. If v0/v1 is set to a value before a jr ra, and the code following it uses the v0/v1 registers without setting them to a new value, they are being used as return values
- a0-a3 are function parameter registers, or occasionally used as temporary registers. For example, a function like Add(1,4); would be compiled to where a0 = 1, a1 = 4, then a JAL instruction will take you to the "Add" function
- t0-t9 are temporary registers. Any time you encounter a JAL/JALR/JR instruction, the state of these registers no longer matter
- s0-s8 registers are saved registers. the state of these registers are suppose to remain unchanged when returning from a JAL/JALR/JR(edited)
- k0-k1 are kernel registers. These are only used within code that performs exception handling stuff
- gp register idk, I've never seen it used in the Zelda64 engine at all
- ra = return address. This register is set whenever a JAL/JALR instruction is hit. used to be able to return back to execution after those calls
- sp = stack pointer. higher addresses = lower on the stack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement