Freescale Semiconductor SC140 To/from a Register AGU, If Srexp = Then NSP → Rn, Else Rn → ESP

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 722
Image 722

TFRA

TFRA

Move the Other Stack Pointer

 

to/from a Register (AGU)

Operation

 

Assembler Syntax

If (SR[EXP] = 1),

then NSP → Rn

TFRA

OSP,Rn

 

else ESP → Rn

 

 

If (SR[EXP] = 1),

then Rn → NSP

TFRA

Rn,OSP

 

else Rn → ESP

 

 

TFRA

Description

TFRA OSP,Rn

Writes the value of the inactive (other) stack pointer (OSP) to an address register (Rn). If EXP (SR[18]) is set, then OSP is the normal stack pointer (NSP). Otherwise, OSP is the exception stack pointer (ESP).

TFRA Rn,OSP

Writes the contents of an address register (Rn) to the inactive (other) stack pointer (OSP). If EXP (SR[18]) is set, then OSP is the normal stack pointer (NSP). Otherwise, OSP is the exception stack pointer (ESP).

Note: The value in NSP or ESP will have the lower three bits equal to zero.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer is used and execution working mode.

Status and Conditions Changed by Instruction

None

A-408

SC140 DSP Core Reference Manual

Page 722
Image 722
Freescale Semiconductor SC140 To/from a Register AGU, If Srexp = Then NSP → Rn, Else ESP → Rn If Srexp = Then Rn → NSP