IPR-NIOS Altera, IPR-NIOS Datasheet - Page 170
IPR-NIOS
Manufacturer Part Number
IPR-NIOS
Description
IP NIOS II MEGACORE RENEW
Manufacturer
Altera
Type
MegaCorer
Datasheet
1.IP-NIOS.pdf
(294 pages)
Specifications of IPR-NIOS
License
Renewal License
Lead Free Status / RoHS Status
Not applicable / Not applicable
- Current page: 170 of 294
- Download datasheet (3Mb)
7–6
Figure 7–3. Stack Frame Using Variable Arguments
Nios II Processor Reference Handbook
Function Prologues
Stack pointer
Higher addresses
Lower addresses
In order for varargs to work, functions that take variable arguments allocate 16 extra
bytes of storage on the stack. They copy to the stack the first 16 bytes of their
arguments from registers r4 through r7 as shown in
Stack Frame for a Function with Structures Passed By Value
Functions that take struct value arguments still have their first 16 bytes of arguments
arriving in registers r4 through r7, just like other functions.
If part of a structure is passed using registers, the function might need to copy the
register contents back to the stack. This operation is similar to that required in the
variable arguments case as shown in
The Nios II C/C++ compiler generates function prologues that allocate the stack
frame of a function for storage of stack temporaries and outgoing arguments. In
addition, each prologue is responsible for saving the state of the calling function. This
entails saving certain registers on the stack. These registers, the callee-saved registers,
are listed in
callee-saved register only if the function uses the register.
Given the function prologue algorithm, when doing a back trace, a debugger can
disassemble instructions and reconstruct the processor state of the calling function.
Just prior to calling b()
In function a()
arguments
Outgoing
stack
Table 7–2 on page
Frame pointer
Stack pointer
7–2. A function prologue is required to save a
Just after executing prologue
Return address
In function b()
Figure
Saved frame
Other saved
temporaries
arguments
Copy of r7
Copy of r6
Copy of r5
Copy of r4
arguments
Incoming
Space for
Space for
registers
outgoing
pointer
stack
stack
stack
7–3.
Allocated and freed by a()
Allocated and freed by b()
(i.e. the current function)
(i.e. the calling function)
Figure
Chapter 7: Application Binary Interface
December 2010 Altera Corporation
7–3.
Stacks
Related parts for IPR-NIOS
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
CYCLONE II STARTER KIT EP2C20N
Manufacturer:
Altera
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 35 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 15 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 30 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
High-performance, low-power erasable programmable logic devices with 8 macrocells, 10ns
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
High-performance, low-power erasable programmable logic devices with 8 macrocells, 7ns
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Classic EPLD
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
High-performance, low-power erasable programmable logic devices with 8 macrocells, 10ns
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 25 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet: