Branching :                                                                                                                                                  Print this page
<< Previous |  First Last |  Next >>       

In this case, the shift instruction is fetched while the branch instruction is being executed.

After evaluating the branch condition, the processor fetches the instruction at LOOP or at NEXT, depending on whether the branch condition is true or false, respectively.

In either case, it completes execution of the shift instruction.

Logically the program is executed as if the branch instruction was placed after the shift instruction. That is, branching takes place one instruction later than where the branch instruction appears in the instruction sequence in the memory, hence the name “delayed branch” .

Figure 9.15 shows the execution timing for the last two passes through the loop of reordered instructions.

Figure 9.16 shows the execution timing for the last two passes through the loop of the original program loop.

<< Previous |  First Last |  Next >>