Analog Devices adsp-2100 Manual page 408

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

TOPPCSTACK
A special version of the Register-to-Register Move instruction, Type 17, is provided
for reading (and popping) or writing (and pushing) the top value of the PC stack.
The normal POP PC instruction does not save the value popped from the stack, so to
save this value into a register you must use the following special instruction:
reg = TOPPCSTACK;
The PC stack is also popped by this instruction, after a one-cycle delay. A NOP
should usually be placed after the special instruction, to allow the pop to occur
properly:
reg = TOPPCSTACK;
NOP;
There is no standard PUSH PC stack instruction. To push a specific value onto the
PC stack, therefore, use the following special instruction:
TOPPCSTACK = reg;
The stack is pushed immediately, in the same cycle.
Note that "TOPPCSTACK" may not be used as a register in any other instruction type!
Examples:
AX0 = TOPPCSTACK;
NOP;
TOPPCSTACK = I7;
Only the following registers may be used in the special TOPPCSTACK instructions:
ALU, MAC, & Shifter Registers
AX0
AR
AX1
MR0
MX0
MR1
MX1
MR
AY0
AY1
MY0
MY1
There are several restrictions on the use of the special TOPPCSTACK instructions;
they are described in Chapter 3, Program Control.
{pop PC stack into reg}
{"toppcstack" may also be lowercase}
{allow pop to occur correctly}
{push reg contents onto PC stack}
{pop PC stack into AX0}
{push contents of I7 onto PC stack}
DAG Registers
SI
I0
SE
I1
SR0
I2
SR1
I3
(instruction continues on next page)
STACK CONTROL
I4
M0
M4
I5
M1
M5
I6
M2
M6
I7
M3
M7
MISC
15
L0
L4
L1
L5
L2
L6
L3
L7
15 – 85

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents