130
Chapter 7 Branch Instruction
3.Actual Example (with Delay Slot)
3. Actual Example (with Delay Slot)
3.1 JMP:D @Ri / CALL:D @Ri Instruction
Ri referred in JMP:D @Ri / CALL:D @Ri instruction remains intact even if instructions within delay
slot update Ri.
• Example
3.2 RET:D Instruction
RP referred in RET:D instruction remains intact even if instructions within delay slot update RP.
• Example
3.3 Bcc:D rel Instruction
Flag referred in Bcc:D rel instruction also remains unaffected by instructions within delay slot.
• Example
3.4 CALL:D Instruction
When RP is referred using the instruction within delay slot of CALL:D instruction, the data updated
by CALL:D instruction is read out.
• Example
LDI:32 #Label, R0
JMP:D @R0 ; Branches to Label.
LDI:8 #0, R0 ; Not affect any branched address.
...
RET:D ; Branches to the address previously specified in RP.
MOV R8, RP ; Not affect any return operation.
...
ADD #1, R0 ; Change of flag
BC:D Overflow ; Branches in accordance with the execution result of instructions above.
ANDCCR #0 ; This flag update is not referred in branch instruction above.
...
CALL:D Label ; Branches by updating RP.
MOV RP, R0 ; Transfers RP based on the execution results of CALL: D above.
...