Freescale Semiconductor SC140 specifications Rtstkd, SP 8 → PC, SP 8 → SP

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 690
Image 690

RTSTKD

RTSTKD

Restore PC from Stack

RTSTKD

 

Using a Delay Slot (AGU)

 

Operation

Assembler Syntax

 

(SP – 8) → PC

RTSTKD

 

SP – 8 → SP

 

 

Description

 

 

RTSTKD

 

 

Forces a return from a subroutine or exception by restoring the program counter (PC) from the active stack in memory after executing the execution set in the delay slot. The restore to the PC is not from the RAS register, even if RAS is valid. The implicit pop is done before the execution set in the delay slot is executed.The stack pointer decrements by 8 and RAS becomes invalid. This instruction can be used to bypass RAS (for example, when the return address is changed directly on the stack). RTSTK does one 32-bit long-word memory access.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer is used.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

EMR[3]

NMID

Cleared .

A-376

SC140 DSP Core Reference Manual

Page 690
Image 690
Freescale Semiconductor SC140 specifications Rtstkd, SP 8 → PC, SP 8 → SP