129
Chapter 7 Branch Instruction
1.Branch Instruction with Delay Slot
Chapter 7 Branch Instruction

FR60 can instruct the operation with and without delay slot for branch instruction.

1. Branch Instruction with Delay Slot

Branch instruction with delay slot

2. Operation of Branch Instruction with Delay Slot

Operation with delay slot executes the instruction located in the next address where a branch instruction exists
(referred to as delay slot) and then branches before executing branched instructions.
Since it executes delay slot instruction before branch operation, apparent execution rate becomes 1 cycle.
Instead, if delay slot has no valid instruction, NOP instruction must be entered.
• Example
In conditional branch instruction, regardless of whether branch parameter is approved or not, instructions
located in delay slot are executed.
In delay branch instruction, execution sequence of some instructions seems opposite, however, it only applies
to updating process on the PC. Any other operation (register update/look-up) is executed in the order of
description.
JMP:D @Ri CALL:D label12 CALL:D @Ri RET:D
BRA:D label9 BNO:D label9 BEQ:D label9 BNE:D label9
BC:D label9 BNC:D label9 BN:D label9 BP:D label9
BV:D label9 BNV:D label9 BLT:D label9 BGE:D label9
BLE:D label9 BGT:D label9 BLS:D label9 BHI:D label9
; Sequence of instruction
ADD R1 R2 ;
BRA:D LABEL ; Branch instruction
MOV R2 R3 ; Delay slot ...... To be executed before the branch.
...
LABEL : ST R3 @R4 ; Branched instruction