Analog Devices ADSP-BF53x Blackfin Reference page 315

Table of Contents

Advertisement

Table 7-1. Types of Return Instruction
Mnemonic
RTS
RTI
RTX
RTN
RTE
Table 7-2. Required Mode for the Return Instruction
Mnemonic
RTS
RTI, RTX, and RTN
RTE
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
Description
Forces a return from a subroutine by loading the value of the RETS
Register into the Program Counter (PC), causing the processor to fetch
the next instruction from the address contained in RETS. For nested
subroutines, you must save the value of the RETS Register. Otherwise,
the next subroutine CALL instruction overwrites it.
Forces a return from an interrupt routine by loading the value of the
RETI Register into the PC. When an interrupt is generated, the proces-
sor enters a non-interruptible state. Saving RETI to the stack re-enables
interrupt detection so that subsequent, higher priority interrupts can be
serviced (or "nested") during the current interrupt service routine. If
RETI is not saved to the stack, higher priority interrupts are recognized
but not serviced until the current interrupt service routine concludes.
Restoring RETI back off the stack at the conclusion of the interrupt
service routine masks subsequent interrupts until the RTI instruction
executes. In any case, RETI is protected against inadvertent corruption
by higher priority interrupts.
Forces a return from an exception routine by loading the value of the
RETX Register into the PC.
Forces a return from a non-maskable interrupt (NMI) routine by load-
ing the value of the RETN Register into the PC.
Forces a return from an emulation routine and emulation mode by
loading the value of the RETE Register into the PC. Because only one
emulation routine can run at a time, nesting is not an issue, and saving
the value of the RETE Register is unnecessary.
Required Mode
User & Supervisor
Supervisor only. Any attempt to execute in User mode produces a
protection violation exception.
Emulation only. Any attempt to execute in User mode or Supervi-
sor mode produces an exception.
Program Flow Control
7-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents