ADSP-BF53x/BF56x Blackfin Processor Programming Reference
4-17
Program Sequencer
The Blackfin instruction set features a pair of instructions that provides
cleaner and more efficient functionality than the above example: the
LINK
and
UNLINK
instructions. These multi-cycle instructions perform multiple
operations that can be best explained by the equivalent code sequences:
The following subroutine does the same job as the one above, but it also
saves the
RETS
register to enable nested subroutine calls. Therefore, the
value stored to
FP
is 8 bytes off the original
SP
value. Since no local frame
is required, the
LINK
instruction gets the parameter “0”.
_sub2:
LINK 0;
[--SP] = (R7:5);
R6 = [FP+8];
/* R6 = 3 */
R7 = [FP+12];
/* R7 = 1 */
R5 = R6 + R7;
R6 = R6 - R7;
[FP+8] = R5;
/* R5 = 4 */
[FP+12] = R6;
/* R6 = 2 */
(R7:5) = [SP++];
UNLINK;
RTS;
_sub2.end:
Table 4-3. Link and Unlink Code Sequencer
LINK n;
UNLINK;
[--SP] = RETS;
[--SP] = FP;
FP = SP;
SP += -n;
SP = FP;
FP = [SP++];
RETS = [SP++];
Содержание ADSP-BF53x Blackfin
Страница 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 780: ...Product Identification Register 21 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 994: ...Instructions Listed By Operation Code C 194 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...