For the MIPS assembly instructions below, what is the corresponding C statement?
ID: 2084230 • Letter: F
Question
For the MIPS assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.sII $t0, $s0, 2 # $t0 = f * 4 $t0, $s6, $t0 # $t0 = &A;[f] sII $tI, $sI, 2 # $tI = g * 4 add $tI, $s7, $tI # $tI = &B;[g] Iw $s0, 0($ t0) # f = A [f] addi $t2, $t0, 4 iW $t0, 0($t2) add $to, $t0, $s0 sw $t0, 0($t1)Explanation / Answer
The corresponding C statement for the above MIPS is given as
B[g] = A[f + 1] + A[f];
f = A[f];
The two statements cannot swap order.