48
CHAPTER 2 CPU
2.7.1
Branch Instructions with Delay Slots
A branch instruction causes the program to branch and execute the instruction at the
branch destination after the instruction (called the delay slot) placed immediately after
the branch instruction is executed.
■
Branch Instructions with Delay Slots
The following instructions execute branch operation with a delay slot:
■
Theory of Operation of Branch Instructions with Delay Slots
A branch instruction causes the program to branch and execute the instruction at the branch
destination after the instruction (called the delay slot) placed immediately after the branch
instruction is executed.
Since a delay slot instruction is executed before branching, the execution speed seems one
cycle. However, when a valid instruction cannot be put at the delay slot, the NOP instruction
must be provided.
[Example]
For a conditional branch instruction, the instruction placed at the delay slot is executed whether
the branch condition is satisfied or not.
For delayed branch instructions, the execution order of some instructions seems to be reversed.
This is only applicable to PC updating. Other operations, such as register updating and
referencing, are executed in order of coding.
Concrete examples are shown below.
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
;
Instruction list
ADD
R1, R2
;
BRA:D
LABEL
; Branch instruction
MOV
R2, R3
; Delayed slot---Executed before branching
:
LABEL :
ST
R3, @R4
; Branch destination
Summary of Contents for MB91F109
Page 2: ......
Page 3: ...FUJITSU LIMITED FR30 32 Bit Microcontroller MB91F109 Hardware Manual ...
Page 4: ......
Page 10: ...vi ...
Page 24: ...xx ...
Page 96: ...72 CHAPTER 2 CPU ...
Page 224: ...200 CHAPTER 4 BUS INTERFACE ...
Page 234: ...210 CHAPTER 5 I O PORTS ...
Page 268: ...244 CHAPTER 9 U TIMER ...
Page 290: ...266 CHAPTER 10 UART ...
Page 314: ...290 CHAPTER 12 16 BIT RELOAD TIMER ...
Page 322: ...298 CHAPTER 13 BIT SEARCH MODULE ...
Page 392: ...368 CHAPTER 16 FLASH MEMORY ...
Page 432: ...408 APPENDIX E Instructions F Table E 2 Instruction Formats OP rel11 5 11 ...
Page 448: ...424 APPENDIX E Instructions ...
Page 449: ...425 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 458: ...434 INDEX ...
Page 460: ......
Page 461: ...FUJITSU SEMICONDUCTOR FR30 32 Bit Microcontroller MB91F109 Hardware Manual ...