[prev] 41 [next]

Function call in MIPS:

Example: function f() calls function g(a,b,c,d,e,f)

int f(...)
{
   // variables happen to be stored 
   // in registers $s0, $s1, ..., $s5 
   int a,b,c,d,e,f;
   ...
   ...
}
int g(int u,int v,int w,int x,int y,int z)
{
   return u+v+w*w*x*y*z;
}