MIPS/GCC Procedure Calling Conventions
Step-1: Pass the arguments:
- The first four arguments are passed in registers $a0-$a3
- Remaining arguments are pushed onto the stack
(in reverse order arg5 is at the top of the stack).
Step-2: Save caller-saved registers
- Save registers $t0-$t9 if they contain live values at the call site.
Step-3: Execute a jal instruction.