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!

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!  translating MIPS to C can some explain how in the comments,
on the comments to the right of the code, I dont understand how $t0=&A[f] is a result of add $t0, $s6, $t0. Same with $t2=&A[f+1] from addi $t2, $t0, 4
line 1 becomes the line2, and how the line 5 becomes line

= 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

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!