IA-32 Intel® Architecture Optimization
Assembly/Compiler Coding Rule 3. (M impact, H generality) Arrange
code to be consistent with the static branch prediction algorithm: make the
fall-through code following a conditional branch be the likely target for a
branch with a forward target, and make the fall-through code following a
conditional branch be the unlikely target for a branch with a backward target.
Example 2-5 illustrates the static branch prediction algorithm. The body
of an
if-then
Example 2-5
Pentium 4 Processor Static Branch Prediction Algorithm
forw ard conditional branches not taken (fall through)
Backw ard Conditional Branches are taken
2-20
conditional is predicted to be executed.
If <condition> {
...
}
for <condition> {
...
}
loop {
} <condition>
Unconditional Branches taken
JM P
Need help?
Do you have a question about the ARCHITECTURE IA-32 and is the answer not in the manual?