beautypg.com

Rted, Return from exception with a delay slot (agu) – Freescale Semiconductor StarCore SC140 User Manual

Page 682

background image

A-368

SC140 DSP Core Reference Manual

RTED

RTED

Return From Exception With a Delay Slot (AGU)

RTED

Description

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

RTED

RTED

Returns from an exception routine after executing the execution set in the delay slot. The program counter
and status register are popped from the active stack in memory, and program execution continues at the
address specified in 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 RTED uses both AGUs. RTED does
two simultaneous 32-bit long-word memory accesses. Instructions that change SR cannot appear in the
same set with this instruction or in the delay slot following the instruction.

Note:

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

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.