Question: Assume a processor that always predicts that conditional branches are not taken. What percentage of the time would it predict correctly for the following block

 Assume a processor that always predicts that conditional branches are not

Assume a processor that always predicts that conditional branches are not taken. What percentage of the time would it predict correctly for the following block of code? li $r1, 1 li $r0, 5 topOfLoop: beq $r0, $zero, endLoop add $r1, $r0, $r1 addi $r0, $r0, -1 b topOfLoop endLoop: Percentage Correct: _____ If we modify the hardware so that the first time it encounters a conditional branch it predicts that it is taken but after that it predicts it will do whatever it did on the previous time it executed the loop what will be the percentage of the time it will predict correctly? Modified Percentage 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!