Instruction Overview
10-18
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
The user-supplied argument for
LINK
determines the size of the allocated
stack frame.
LINK
always saves
RETS
and
FP
on the stack, so the minimum
frame size is 2 words when the argument is zero. The maximum stack
frame size is 2
18
+ 8 = 262152 bytes in 4-byte increments.
UNLINK
performs the reciprocal of
LINK
, de-allocating the frame space by
moving the current value of
FP
into
SP
and restoring previous values into
FP
and
RETS
from the stack.
The
UNLINK
instruction typically follows a Pop Multiple instruction that
restores pointer and data registers previously saved to the stack.
The frame values remain on the stack until a subsequent Push, Push Mul-
tiple or
LINK
operation overwrites them.
Of course, FP must not be modified by user code between
LINK
and
UNLINK
to preserve stack integrity.
Neither
LINK
nor
UNLINK
can be interrupted. However, exceptions that
occur while either of these instructions is executing cause the instruction
to abort. For example, a load/store operation might cause a protection vio-
lation while
LINK
is executing. In that case,
SP
and
FP
are reset to their
original values prior to the execution of this instruction. This measure
ensures that the instruction can be restarted after the exception.
Note that when a
LINK
operation aborts due to an exception, the stack
memory may already be changed due to stores that have already completed
before the exception. Likewise, an aborted
UNLINK
operation may leave the
FP
and
RETS
registers changed because of a load that has already completed
before the interruption.
The illustrations below show the stack contents after executing a
LINK
instruction followed by a Push Multiple instruction.
Summary of Contents for ADSP-BF53x Blackfin
Page 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...