RTED

RTED Return From Exception With a Delay Slot (AGU) RTED

Operation

Assembler Syntax

(SP – 8) → PC

RTED

(SP – 4) → SR

 

SP – 8 → SP

 

0 → NMID

 

Description

 

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.

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-368

SC140 DSP Core Reference Manual

Page 682
Image 682
Freescale Semiconductor SC140 specifications Rted