Branches
4-16
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
CALL _sub;
R1 = [SP++];
/* R1 = 4 */
R0 = [SP++];
/* R0 = 2 */
...
_parent.end:
_sub:
[--SP] = FP;
/* save frame pointer */
FP = SP;
/* new frame */
[--SP] = (R7:5);
/* multiple push */
R6 = [FP+4];
/* R6 = 3 */
R7 = [FP+8];
/* R7 = 1 */
R5 = R6 + R7;
/* calculate anything */
R6 = R6 - R7;
[FP+4] = R5;
/* R5 = 4 */
[FP+8] = R6;
/* R6 = 2 */
(R7:5) = [SP++];
/* multiple pop */
FP = [SP++];
/* restore frame pointer */
RTS;
_sub.end:
Since the stack pointer
SP
is modified inside the subroutine for local stack
operations, the frame pointer
FP
is used to save the original state of
SP
.
Because the 32-bit frame pointer itself must be pushed onto the stack first,
the
FP
is four bytes off the original
SP
value.
Содержание 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...