Name: Box: Date:
(20 points) Convert the following C code to MIPS assembly instructions. Use the minimum number of instructions necessary. Assume that variables f, g and h are 32- bit integers stored in registers
$t2respectively and that the base address of arrays A and B are in registers
$t9respectively. A and B are arrays of 4-byte integers (this is important).
Be careful not to modify the variables unintentionally. If you need to store temporary values, use one of the other t registers.
f = g + h;
f = g - (h - 5);
c. Remember, the elements of A are 4-bytes big!
f = A - g;
A = f + B;