Return from exception (agu), Description – Freescale Semiconductor StarCore SC140 User Manual

Page 680

Advertising
background image

A-366

SC140 DSP Core Reference Manual

ROR

RTE

Return From Exception (AGU)

RTE

Description

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

Status and Conditions Changed by Instruction

Operation

Assembler Syntax

(SP – 8)

→ PC

(SP – 4)

→ SR

SP – 8

→ SP

0

→ NMID

RTE

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.

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer used and execution working mode.

Register Address

Bit Name

Description

SR[31:0]

Restores SR from stack.

EMR

[3]

NMID

Enables NMI.

Advertising