Question: Say you are executing a program that contains the following high-level code snippet: A[8] = {1, 3, 4, 7, 2, 9, 8, 1}; for (i
Say you are executing a program that contains the following high-level code snippet:
A[8] = {1, 3, 4, 7, 2, 9, 8, 1};
for (i = 0; i < 8; i++) {
if (A[i] > 5) {
else {
}
When compiled, this code contains two branches, as shown below. The BNE is part of the if statement aboveif the condition is true, the branch is not taken; if the condition is false, the branch is taken. The BEQ controls the end of the loop.
Address
Decimal Hex
20 0x14 loop
40 0x28 BNE R4, R0, else
52 0x34 BEQ R7, R8, loop
Assume the following: -
you have a 4-line, (2,2) correlating branch predictor, with all entries and the global history are all initially set to 11.
Determine the overall accuracy of this predictor using the code above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
