6-24
MPC7400 RISC Microprocessor Users Manual
Execution Unit Timings
Figure 6-12. Removal of Fall-Through Branch Instruction
In this case the branch instruction remains in the instruction queue and is removed from the
instruction stream as if it were dispatched. However, it is not dispatched to an execution unit
and is not assigned an entry in the CQ.
When a branch instruction is detected before it reaches a dispatch position, and if the branch
is correctly predicted as taken, folding the branch instruction (and any instructions from the
incorrect path) reduces the latency required for ow control to zero; instruction execution
proceeds as though the branch was never there.
The advantage of removing the fall-through branch instructions at dispatch is only
marginally less than that of branch folding. Because the branch is not taken, only the branch
instruction needs to be discarded. The only cost of expelling the branch instruction from
one of the dispatch entries rather than folding it is missing a chance to dispatch an
executable instruction from that position.
6.4.1.2 Branch Instructions and Completion
As described in the previous section, instructions that do not update either the LR or CTR
are removed from the instruction stream before they reach the CQ, either by branch folding
(in the case of taken branches) or by removing fall-through branch instructions at dispatch
(in the case of non-taken branches). However, branch instructions that update the
architected LR and CTR must do so in program order and therefore must perform
write-back in the completion stage, like the instructions that update the FPRs, GPRs, and
VRs.
Branch instructions that update the CTR or LR pass through the instruction queue like
no-branch instructions. At the point of dispatch, however, they are not sent to an execution
unit, but rather are assigned a slot in the CQ, as shown in Figure 6-13.
IQ5
IQ4
IQ3
IQ2
IQ1
IQ0
add5
add4
add3
b
add2
add1
add5
add4
add3
b
add7
add6
add5
add4
Branch Fall-Through
(Not-Taken Branch)
Clock 0
Clock 1
Clock 2