Data Types; Memory Alignment - Altera Nios II User Manual

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

February 2014
NII51016-13.1.0
NII51016-13.1.0
This chapter describes the Application Binary Interface (ABI) for the Nios
processor. The ABI describes:
How data is arranged in memory
Behavior and structure of the stack
Function calling conventions

Data Types

Table 7–1. Representation of Data C/C++ Types
char, signed char
unsigned char
short, signed short
unsigned short
int, signed int
unsigned int
long, signed long
unsigned long
float
double
pointer
long long
unsigned long long

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.
© 2014 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, HARDCOPY, MAX, MEGACORE, NIOS, QUARTUS and STRATIX are Reg. U.S. Pat. & Tm. Off.
and/or trademarks of Altera Corporation in the U.S. and other countries. All other trademarks and service marks are the property of their respective holders as described at
www.altera.com/common/legal.html. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard warranty, but
reserves the right to make changes to any products and services at any time without notice. Altera 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 Altera. Altera 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.
Nios II Processor Reference Handbook
February 2014
7. Application Binary Interface
Type
Size (Bytes)
Representation
1
two's complement (ASCII)
1
binary (ASCII)
2
two's complement
2
binary
4
two's complement
4
binary
4
two's complement
4
binary
4
IEEE
8
IEEE
4
binary
8
two's complement
8
binary
®
II
Subscribe

Advertisement

Table of Contents
loading

Table of Contents