Systems and methods for handling the event of a wrong branch prediction
and an instruction rejection in a digital processor are disclosed. More
particularly, hardware and software are disclosed for detecting a
condition where a branch instruction was mispredicted and an instruction
that preceded the branch instruction is rejected after the branch
instruction is executed. When the condition is detected, the branch
instruction and rejected instruction are recirculated for execution.
Until, the branch instruction is re-executed, control circuitry can
prevent instructions from being received into an instruction buffer that
feeds instructions to the execution units of the processor by fencing the
instruction buffer from the fetcher. The instruction fetcher may continue
fetching instructions along the branch target path into a local cache
until the fence is dropped.