ADSP-BF53x/BF56x Blackfin Processor Programming Reference
7-11
Program Flow Control
Table 7-1. Types of Return Instruction
Mnemonic
Description
RTS
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.
RTI
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.
RTX
Forces a return from an exception routine by loading the value of the
RETX Register into the PC.
RTN
Forces a return from a non-maskable interrupt (NMI) routine by load-
ing the value of the RETN Register into the PC.
RTE
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.
Table 7-2. Required Mode for the Return Instruction
Mnemonic
Required Mode
RTS
User & Supervisor
RTI, RTX, and RTN
Supervisor only. Any attempt to execute in User mode produces a
protection violation exception.
RTE
Emulation only. Any attempt to execute in User mode or Supervi-
sor mode produces an exception.
Содержание ADSP-BF53x Blackfin
Страница 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 780: ...Product Identification Register 21 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 994: ...Instructions Listed By Operation Code C 194 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...