User’s Manual
IBM PowerPC 750GX and 750GL RISC Microprocessor
does not write back its results to the architected registers. Instead, it stalls in the completion queue. Of course, when the completion queue is full, no additional instructions can be dispatched, even if an execution unit is idle.
In the case of a misprediction, the 750GX can easily redirect the instruction stream because the programming model has not been updated. When a branch is mispredicted, all instructions that were dispatched after the predicted branch instruction are flushed from the completion queue, and any results are flushed from the Rename Registers.
The BTIC is a cache of two recently used instructions at the target
In some situations, an instruction sequence creates dependencies that keep a branch instruction from being predicted because the address for the target of the branch is not available. This delays execution of the subsequent instruction stream. The instruction sequences and the resulting action of the branch instruction are as follows:
•An mtspr(LR) followed by a Branch Conditional to Link Register
•An mtspr(CTR) followed by a Branch Conditional to Count Register
•An mtspr(CTR) followed by a bc (CTR
•A third bc (based on CR) is encountered while there are two unresolved bc (based on CR) instructions. The third bc (based on CR) is not executed, and fetching stops until one of the previous bc (based on CR) instructions is resolved. (Note that branch conditions can be a function of the CTR and the CR; if the CTR condition is sufficient to resolve the branch, then a
Static Branch Prediction
The PowerPC Architecture provides a field in branch instructions (the BO field) to allow software to speculate (hint) whether a branch is likely to be taken. Rather than delaying instruction processing until the condition is known, the 750GX uses the instruction encoding to predict whether the branch is likely to be taken and begins fetching and executing along that path. When the branch condition is known, the prediction is evalu- ated. If the prediction was correct, program flow continues along that path. Otherwise, the processor flushes any instructions and their results from the mispredicted path, and program flow resumes along the correct path.
Static branch prediction is used when HID0[BHT] is cleared. That is, the branch history table, which is used for dynamic branch prediction, is disabled.
For information about static branch prediction, see “Conditional Branch Control,” in Chapter 4, “Addressing Modes and Instruction Set Summary” in the PowerPC Microprocessor Family: The Programming Environments Manual.
gx_06.fm.(1.2) | Instruction Timing |
March 27, 2006 | Page 229 of 377 |