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, double and 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 the LDRD and STRD instructions in
ARMv5TE and later.
The default implementations of malloc(), realloc(),
and calloc() maintain an eight-byte aligned
heap.
The default implementation of alloca() returns
an eight-byte aligned block of memory.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.