Question: y = L[8*j] For the above C code, assume y in $s1 , j in $t1 , L is an array of words, and the

y = L[8*j]

For the above C code, assume y in $s1, j in $t1, L is an array of words, and the base address of L is in $s2. Which of the following is its corresponding MIPS code?

a) lw $s1, 32*j($s2)

b) add $t2, $t1, $s2 lw $s1, 8 ($t2)

c) sll $t2, $t1, 5 add $t2, $t2, $s2 lw $s1,0($t2)

d) sll $t2, $t1, 3 add $t2, $t2, $s2 lw $s1,0($t2)

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!