IPR-NIOS Altera, IPR-NIOS Datasheet - Page 169

no-image

IPR-NIOS

Manufacturer Part Number
IPR-NIOS
Description
IP NIOS II MEGACORE RENEW
Manufacturer
Altera
Type
MegaCorer
Datasheet

Specifications of IPR-NIOS

License
Renewal License
Lead Free Status / RoHS Status
Not applicable / Not applicable
Chapter 7: Application Binary Interface
Stacks
Figure 7–2. Stack Frame after Calling alloca()
December 2010 Altera Corporation
1
Stack Frame for a Function With alloca()
The Nios II stack frame implementation provides support for the alloca() function,
defined in the Berkeley Software Distribution (BSD) extension to C, and implemented
by the gcc compiler.
called. The space allocated by alloca() replaces the outgoing arguments and the
outgoing arguments get new space allocated at the bottom of the frame.
The Nios II C/C++ compiler maintains a frame pointer for any function that calls
alloca(), even if -fomit-frame-pointer is spec if ed
Stack Frame for a Function with Variable Arguments
Functions that take variable arguments (varargs) still have their first 16 bytes of
arguments arriving in registers r4 through r7, just like other functions.
higher addresses
lower addresses
sp
arguments
outgoing
space for
Before
stack
Figure 7–2
depicts what the frame looks like after alloca() is
After calling alloca()
arguments
allocated
space for
outgoing
memory
alloca()
stack
by
Nios II Processor Reference Handbook
sp
7–5

Related parts for IPR-NIOS