29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong> Features<br />

4.20 <strong>Compiler</strong> eight-byte alignment features<br />

The compiler has <strong>the</strong> following eight-byte alignment features:<br />

• The Procedure Call Standard <strong>for</strong> <strong>the</strong> <strong>ARM</strong> Architecture (AAPCS) requires that <strong>the</strong> stack<br />

is eight-byte aligned at all external interfaces. The compiler and C libraries preserve <strong>the</strong><br />

eight-byte alignment of <strong>the</strong> stack. In addition, <strong>the</strong> default C library memory model<br />

maintains eight-byte alignment of <strong>the</strong> heap.<br />

• Code is compiled in a way that requires and preserves <strong>the</strong> eight byte alignment constraints<br />

at external interfaces.<br />

• If you have assembly language files, or legacy objects, or libraries in your project, it is<br />

your responsibility to check that <strong>the</strong>y preserve eight-byte stack alignment, and correct<br />

<strong>the</strong>m if required.<br />

• In RVCT v2.0 and later, and in <strong>ARM</strong> <strong>Compiler</strong> 4.1 and later, double and long long data<br />

types are eight-byte aligned <strong>for</strong> compliance with <strong>the</strong> Application Binary Interface <strong>for</strong> <strong>the</strong><br />

<strong>ARM</strong> Architecture (AEABI). This enables efficient use of <strong>the</strong> LDRD and STRD instructions<br />

in <strong>ARM</strong>v5TE and later.<br />

• The default implementations of malloc(), realloc(), and calloc() maintain an eight-byte<br />

aligned heap.<br />

• The default implementation of alloca() returns an eight-byte aligned block of memory.<br />

4.20.1 See also<br />

Concepts<br />

<strong>Using</strong> <strong>the</strong> Linker:<br />

• Section alignment with <strong>the</strong> linker on page 4-22.<br />

Reference<br />

<strong>ARM</strong> ® C and C++ Libraries and Floating-Point Support Reference:<br />

• alloca() on page 2-5.<br />

O<strong>the</strong>r in<strong>for</strong>mation<br />

• Procedure Call Standard <strong>for</strong> <strong>the</strong> <strong>ARM</strong> Architecture,<br />

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042-/index.html<br />

• Application Binary Interface (ABI) <strong>for</strong> <strong>the</strong> <strong>ARM</strong> Architecture,<br />

http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 4-28<br />

ID061811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!