Question: Consider the MIPS assembly language program given below ox40001000 beg $s0, $81, 0x40001004 0x40001008 0x4000100C add $t1, $t2, $t3 addi $t7, $t7, -4 0x40001010 next



Consider the MIPS assembly language program given below ox40001000 beg $s0, $81, 0x40001004 0x40001008 0x4000100C add $t1, $t2, $t3 addi $t7, $t7, -4 0x40001010 next equal: 0x40001014 sub St1, $t2, $t3 0x40001018 0x40001014 addi s an next: Assume that the pipelined MIPS uses static branch prediction to reduce the number of pipeline stalls due to branch hazards. Assume that $s0 = 0x0000000D and $s1-0x0000000E. (a) How many instructions must be flushed from the pipeline if all branches are predicted to be TAKEN (b) How many instructions must be flushed from the pipeline if all branches are predicted to be NOT TAKEN ) If the branch decision logic is moved to the ID stage of the pipeline, how many instructions must be flushed from the pipeline when the branch is mispredicted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
