Question: 8. Assume 'array' is a ten element array of integers whose address is stored in Sto. Also assume variable x is $t1 and y is

 8. Assume 'array' is a ten element array of integers whose

8. Assume 'array' is a ten element array of integers whose address is stored in Sto. Also assume variable x is $t1 and y is $12. For each part, pick the MIPS assembly code which has the same functionality as the given C code. a. x=array [3]; A - lw $t1, 3($t0), c - lw $t1, 12($t0), E - lb $t1, 12($t0) B - lw $t0, 3($t1) D - lw $t2, 12($t0) B - lw $t1, $t1($t0) b. x=array[x]; A- sll $t1, 3($t0) add $ti, $t0, $t1 lw $t1, 0($t1) c - sll $t1, 3($t0). add $t1,$t0,$t1 lb $t1, 0 ($t1) E - none of the above D - sll $t1, 3($t0) add $t1, $t0,$t1 lw $t1, 0($t0) c. x=y*128 A - mult $ti, $t2, 128 C - sll $t1, $t2, 0x7f E - sll $t1, $t2, 7 B - sll $t1, $t2, 128 D - andi $t1, $t2, 0x7f

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!