Question: 3. [20pts] Consider the following MIPS loop: LOOP: slt beg subi addi $2, $0, $t1 $t2, $0, DONE $t1, $ti, 1 $s2, $s2, 2 LOOP
![3. [20pts] Consider the following MIPS loop: LOOP: slt beg subi](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f0878e4b99e_37366f0878db264f.jpg)
3. [20pts] Consider the following MIPS loop: LOOP: slt beg subi addi $2, $0, $t1 $t2, $0, DONE $t1, $ti, 1 $s2, $s2, 2 LOOP DONE: a. [5pts] Assume that $t1 is set to 9. What is the value of $s 2 assuming $s 2 is initially O? b. (10pts] Write the corresponding C routine for the loop above. Assume that $s 1, $s 2, $t1, and $t2 are integers A, B, i, and temp, respectively. C. (5pts] For the MIPS code above, assume that $t1 is initialized to N. How many MIPS instructions are executed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
