Description
Branch to the instruction located at address determined by PC + rBL.
The mnemonic breald will set the L bit. If the L bit is set, linking will be performed. The current value of PC will be stored in rDL.
The mnemonics bread and breald will set the D bit. The D bit determines whether there is a branch delay slot or not. If the D bit is set, it means that there is a delay slot and the instruction following the branch (that is, in the branch delay slot) is allowed to complete execution before executing the target instruction.
If the D bit is not set, it means that there is no delay slot, so the instruction to be executed after the branch is the target instruction.
Pseudocode
if L = 1 then
(rDL) ← PC
PC ← PC + (rBL)
if D = 1 then
allow following instruction to complete execution
Registers Altered
- rDL
- PC
Latency
- 2 cycles (if the D bit is set with
C_AREA_OPTIMIZED
≠2) - 3 cycles (if the D bit is not set with
C_AREA_OPTIMIZED
≠2) - 6 cycles (if the D bit is set with
C_AREA_OPTIMIZED
=2) - 7 cycles (if the D bit is not set with
C_AREA_OPTIMIZED
=2)
If C_USE_MMU
> 1 two additional cycles are added with
C_AREA_OPTIMIZED
=2.
Notes
- The instruction breal is not available.
- Absolute extended address branches can be performed with the instructions bra, brad, and brald.
- A delay slot must not be used by the following: imm, imml, branch, or break instructions. Interrupts and external hardware breaks are deferred until after the delay slot branch has been completed.