Exception Processing
8.4.7 Branch Prediction Error
A branch prediction error occurs when a taken branch instruction is executed creating a
branch cache entry and then this same code is re-executed with the former branch instruc-
tion now appearing as an extension word for another opcode.In this type of sequence where
the interpretation of the code stream is dynamically changed, a branch prediction error may
In the past, Motorola had suggested using a TRAPF (word or long) instruction to remove a
branch in the following construct:
bra label2
label1: <op1>
label2: <op2>
where a TRAPF (word or long) can be substituted for the branch instruction and the subse-
quent instruction, <op1> instruction effectively appears as the extension word of the TRAPF.
The BPE bit of the FSLW can be asserted if the <op1> instruction is a taken branch instruc-
tion, but the likelihood of this usage is expected to be very low. The replacement of branch
instructions using this TRAPF construct is still recommended for cases where <op1> is not
a branch instruction. It is the responsibility of the access error handler to test the BPE bit,
and if asserted, clear the branch cache. Refer to 8.4.5 Recovering from an Access Error
for details on how to recover from this error.
Terms of Use | Privacy Policy | DMCA Policy
2006-2020 Rsmanuals.com