RTSTK

RTSTK

Restore PC from Stack (AGU)

RTSTK

Operation

Assembler Syntax

(SP – 8) → PC

RTSTK

SP – 8 → SP

 

Description

 

RTSTK

 

Forces a return from a subroutine or exception by restoring the program counter (PC) from the active stack in memory. 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-374

SC140 DSP Core Reference Manual

Page 688
Image 688
Freescale Semiconductor SC140 Rtstk, Restore PC from Stack AGU, Cleared, Register Address Bit Name Description EMR3