摘要 |
A data processing system 2 incorporating an instruction pipeline 14 and a prefetch unit 16 is provided with a branch prediction mechanism using both a branch prediction memory 20 storing 1-bit values indicating strongly taken or strongly not taken together with a branch prediction cache indicating for certain selected branch history values either weakly taken or weakly not taken predictions. When a conditional branch instruction is encountered, then the preceding branch prediction history is used to access a first prediction within the branch prediction memory 20 and is looked up to check for a hit within the branch prediction cache 22 . If a hit occurs, then a second prediction within the branch prediction cache 22 is used in preference to the first prediction, otherwise the first prediction is used. The misprediction by a first prediction value stored within the branch prediction memory 20 triggers a second prediction to be cached within the branch prediction cache 22 corresponding to that mispredicted history value.
|