ARM ARM1176JZF-S Technical Reference Manual page 312

Table of Contents

Advertisement

5.2.5
Incorrect predictions and correction
ARM DDI 0301H
ID012310
Branch folding is done for all dynamically predicted branches, except that branch folding is not
done for:
BL and BLX instructions, to avoid losing the link
predicted branches onto branches
branches that are breakpointed or have generated an abort when fetched.
Branches are resolved at or before the Ex3 stage of the integer core pipeline. A misprediction
causes the pipeline to be flushed, and the correct instruction stream to be fetched. If branch
folding is implemented, the failure of the condition codes of a folded branch causes the
instruction that follows the folded branch to fail. Whenever a potentially incorrect prediction is
made, the following information, necessary for recovering from the error, is stored:
a fall-through address in the case of a predicted taken branch instruction
the branch target address in the case of a predicted not taken branch instruction.
The PU passes the conditional part of any optimized branch into the integer core. This enables
the integer core to compare these bits with the processor flags and determine if the prediction
was correct or not. If the prediction was incorrect, the integer core flushes the PU and requests
that prefetching begins from the stored recovery address.
Copyright © 2004-2009 ARM Limited. All rights reserved.
Non-Confidential, Unrestricted Access
Program Flow Prediction
5-6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents