I working on translating some C code to MIPS and got stuck on this one line.
int f(int n, int m)
I know this is supposed to be for initializing the variables but how would it look like in MIPS? I'm having n=$a0 and m=$a1.
For Context here is the whole code:
int f(int n, int m) {
if (n ≤ 0)
return m;
else
return f(n-1, n+m);
}
I already understand how the loop works just for some reason I'm stuck on this.