Question: translating MIPS to C can some explain how in the comments, line 1 becomes the line2, and how the line 5 becomes line 6 thanks!
= sll $t0, $50, 2 add $t0, $56, $t0 sll $t1, $si, 2 add $ti, $s7, $t1 lw $s0, 0($t0) addi $t2, $t0, 4 lw $t0, 0($t2) add $t0, $t0, $50 sw $t0, 0($t1) # $t0 = f * 4 # $t0 &A[f] # $t1 = g * 4 # $t1 = &B[g] # f = A[f] # $t2 = &A[f+1] # $t0 A[f+1] # $t0 = A[f+1] + A[f] # B[9] = A[f+1] + A[f] = Answer: B[g] = A[f+1] + A[f] 2.4 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 $80, $81, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and Bare in registers $s6 and $s7, respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
