7. Application Binary Interface
This chapter describes the Application Binary Interface (ABI) for the Nios
®
II
processor. The ABI describes:
•
How data is arranged in memory
•
Behavior and structure of the stack
•
Function calling conventions
7.1. Data Types
Table 82.
Representation of Data C/C++ Types
Type
Size (Bytes)
Representation
char, signed char
1
two’s complement (ASCII)
unsigned char
1
binary (ASCII)
short, signed short
2
two’s complement
unsigned short
2
binary
int, signed int
4
two’s complement
unsigned int
4
binary
long, signed long
4
two’s complement
unsigned long
4
binary
float
4
IEEE
double
8
IEEE
pointer
4
binary
long long
8
two’s complement
unsigned long long
8
binary
7.2. 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.
NII-PRG | 2018.04.18
Intel Corporation. All rights reserved. Intel, the Intel logo, Altera, Arria, Cyclone, Enpirion, MAX, Nios, Quartus
and Stratix words and logos are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other
countries. Intel warrants performance of its FPGA and semiconductor products to current specifications in
accordance with Intel's standard warranty, but reserves the right to make changes to any products and services
at any time without notice. Intel assumes no responsibility or liability arising out of the application or use of any
information, product, or service described herein except as expressly agreed to in writing by Intel. Intel
customers are advised to obtain the latest version of device specifications before relying on any published
information and before placing orders for products or services.
*Other names and brands may be claimed as the property of others.
ISO
9001:2008
Registered