ROR

RTE

Return From Exception (AGU)

Operation

Assembler Syntax

(SP – 8) → PC

RTE

(SP – 4) → SR

 

SP – 8 → SP

 

0 → NMID

 

RTE

Description

RTE

Returns from an exception routine. The program counter and status register are popped from the active stack in memory, and program execution continues at the address specified in the PC. This instruction cannot appear in an execution set with another AGU instruction or a set that uses IFT and IFF, IFT and IFA, or IFF and IFA because RTE uses both AGUs. RTE does two simultaneous 32-bit long-word memory accesses. Instructions that change SR cannot appear in the same set with this instruction.

Note: Because RTE does not use RAS, returning from a subroutine using RTE is illegal. The result is undefined.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer used and execution working mode.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[31:0]

 

Restores SR from stack.

EMR[3]

NMID

Enables NMI.

A-366

SC140 DSP Core Reference Manual

Page 680
Image 680
Freescale Semiconductor SC140 specifications Rte, SP 8 → PC, SP 4 → SR SP 8 → SP → Nmid