|Non-Confidential||PDF version||ARM DUI0472J|
|Home > Compiler Features > Compiler eight-byte alignment features|
The compiler has the following eight-byte alignment features:
The Procedure Call Standard for the ARM Architecture (AAPCS) requires that the stack is eight-byte aligned at all external interfaces. The compiler and C libraries preserve the eight-byte alignment of the stack. In addition, the default C library memory model maintains eight-byte alignment of the heap.
Code is compiled in a way that requires and preserves the eight-byte alignment constraints at external interfaces.
If you have assembly language files, or legacy objects, or libraries in your project, it is your responsibility to check that they preserve eight-byte stack alignment, and correct them if required.
In RVCT v2.0 and later, and in ARM Compiler 4.1 and later,
long long data types
are eight-byte aligned for compliance with the Application
Binary Interface for the ARM Architecture (AEABI). This enables efficient use of
STRD instructions in ARMv5TE and
The default implementations of
calloc() maintain an eight-byte aligned heap.
The default implementation of
alloca() returns an eight-byte aligned
block of memory.