Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 150 2012-2013 Microchip Technology Inc.
FIGURE 10-4: PUSH CALLEE-SAVED REGISTERS
10.3.2.3 AUTO VARIABLE SIZE LIMITS
If a program requires large objects that should not be accessible to the entire program,
consider leaving them as local objects, but using the static specifier. Such variables
are still local to a function, but are no longer auto and are allocated permanent storage
which is not in the software stack.
The auto objects are subject to the similar constraints as non-auto objects in terms
of maximum size, but they are allocated to the software stack rather than fixed memory
locations. Section 10.3.1.3 Non-Auto Variable Size Limits which describes defin-
ing and using large arrays is also applicable to auto objects.
10.3.3 Changing Auto Variable Allocation
As auto variables are dynamically allocated space in the software stack, using the
address attribute or other mechanisms to have them allocated at a non-default loca-
tion is not permitted.
Stack grows
toward
greater
addresses
SP (W15)
FP (W14)
Callee-Saved
Return addr [15:0]
Parameter 1
:
Parameter n-1
Parameter n
Caller Frame
Return addr [23:16]
Registers
Previous FP
Local Variables
and Temporaries
[W14+n] accesses
local context
[W14-n] accesses
function parameters
stack-based

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh