Convert the following C program to MIPS program. Assuming that i, j, k, f, are s
ID: 3553518 • Letter: C
Question
Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already.
A.) f = i + j - k;
B.) f = i + ( j - 8 );
C.) f = -i + ( j + 3); (Hint: $zero)
D.) f = i * 4; (Hint: Relationship between multiplication and shift)
E.) f = i/2 + 2;
F.) f = i;
G.) f = -i;
H.) i++;
If anyone can give a little more explanation along with the answer that would be fantastic. As I missed a class on MIPS and it has proven harder to make up than I expected. Thanks!
Explanation / Answer
Instrunctions:
Assuming that i, j, k, f, are stored in registers $s0,$s1, $s2, $s3 already
f = i + j