Question: convert c code to mips int func1(int a, int b, int c, int d) { int x = func2(a+b, c); x += a + d;

convert c code to mips

int func1(int a, int b, int c, int d)

{

int x = func2(a+b, c);

x += a + d;

return x;

}

fun2 is declared like this:

int func2(int a, int b);

arguments a and b are passed in through $a0 and $a1 and that it returns a value in $v0.

no pseduo instructions

use $ra properly

comment each line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!