Microchip Technology SW006022-1N Scheda Tecnica

Pagina di 338
Memory Allocation and Access
 2012 Microchip Technology Inc.
DS52071B-page 123
FIGURE 7-2:
CALL OR RCALL
The called function (callee) can now allocate space for its local context (Figure 7-3).
FIGURE 7-3:
CALLEE SPACE ALLOCATION 
Finally, any callee-saved registers that are used in the function are pushed 
(Figure 7-4).
Stack grows 
toward 
greater 
addresses
SP (W15)
FP (W14)
Return addr [23:16]
Return addr [15:0]
Parameter 1
:
Parameter n-1
Parameter n
Caller Frame
Stack grows 
toward 
greater 
addresses
SP (W15)
FP (W14)
Local Variables
Return addr [15:0]
Parameter 1
:
Parameter n-1
Parameter n
Caller Frame
Return addr [23:16]
and Temporaries
Previous FP