| |||
| Home > Program Flow Prediction > About program flow prediction | |||
The processor contains program flow prediction hardware, also known as branch prediction. With program flow prediction disabled, all taken branches incur a 13-cycle penalty. With program flow prediction enabled, all mispredicted branches incur a 13-cycle penalty.
To avoid this penalty, the branch prediction hardware operates at the front of the instruction pipeline. The branch prediction hardware consists of:
a 512-entry 2-way set associative Branch Target Buffer (BTB)
a 4096-entry Global History Buffer (GHB)
an 8-entry return stack.
An unpredicted branch executes in the same way as a branch that is predicted as not taken. Incorrect or invalid prediction of the branch prediction or target address causes the pipeline to flush, invalidating all of the following instructions.