Question: Question 2 [25 points]: Consider the MIPS code below and answer the following questions. addi $t0,$zero,0 addi $t1,$zero,100 loop beq $t0,$t1,exit addi $t2,$t0,10 sw $t2,

 Question 2 [25 points]: Consider the MIPS code below and answer

Question 2 [25 points]: Consider the MIPS code below and answer the following questions. addi $t0,$zero,0 addi $t1,$zero,100 loop beq $t0,$t1,exit addi $t2,$t0,10 sw $t2, 0($s0) addi $s0,$s0,4 addi $t0,$t0,1 loop exit (a) How many times will the beq statement be executed? (b) Assume that a static branch-not-taken prediction is used. What percentage of time will the prediction be correct? (c) Assume that a static branch-taken prediction is used. What percentage of time will the prediction be correct? Question 2 [25 points]: Consider the MIPS code below and answer the following questions. addi $t0,$zero,0 addi $t1,$zero,100 loop beq $t0,$t1,exit addi $t2,$t0,10 sw $t2, 0($s0) addi $s0,$s0,4 addi $t0,$t0,1 loop exit (a) How many times will the beq statement be executed? (b) Assume that a static branch-not-taken prediction is used. What percentage of time will the prediction be correct? (c) Assume that a static branch-taken prediction is used. What percentage of time will the prediction be correct

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!