Translate function f into MIPS assembly language. If you nee…
Translate function f into MIPS assembly language. If you need to use registers $t0 through $t7, use the lower-numbered registers first. Assume the function definition for a leaf function func is int func(int a, int b) { return a+b; } The code for the function f is as follows: int f(int a, int b, int c, int d) { return func(a + b, c + d); } All the parameters use registers a0 through a3 and the result should be returned using v0 and v1. Also before using any s registers make sure to push the content of the registered to the stack and pop the content once you are done using the register.
Read Details