Specifications
Memory Alignment
Contents in memory are aligned as follows:
• A function must be aligned to a minimum of 32-bit boundary.
• The minimum alignment of a data element is its natural size. A data element larger than 32 bits need
only be aligned to a 32-bit boundary.
• Structures, unions, and strings must be aligned to a minimum of 32 bits.
• Bit fields inside structures are always 32-bit aligned.
Register Usage
The ABI adds additional usage conventions to the Nios II register file defined in the Programming Model
chapter of the Nios II Processor Reference Handbook.
Table 7-2: Nios II ABI Register Usage
Registe
r
Name Used by
Compiler
Callee
Saved
(45)
Normal Usage
r0 zero v 0x00000000
r1 at Assembler temporary
r2 v Return value (least-significant 32 bits)
r3 v Return value (most-significant 32 bits)
r4 v Register arguments (first 32 bits)
r5 v Register arguments (second 32 bits)
r6 v Register arguments (third 32 bits)
r7 v Register arguments (fourth 32 bits)
r8 v
Caller-saved general-purpose registers
r9 v
r10 v
r11 v
r12 v
r13 v
r14 v
r15 v
7-2
Memory Alignment
NII51016
2015.04.02
Altera Corporation
Application Binary Interface
Send Feedback