Datasheet
Differences
2-18 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0064D
The ADS 1.1 assembler supports two new directives to mark assembly units that contain
functions that require, or preserve 8-byte alignment of the stack. This enables the linker
to detect calls between code that does maintain 8-byte alignment, and code that does not
maintain 8-byte alignment.
PRESERVE8
Use this directive to mark assembly files that contain only functions that
preserve 8-byte alignment of the stack.
REQUIRE8
Use this directive to mark assembly files that contain at least one function
that requires 8-byte alignment of the stack (for example, the stack is
accessed with
LDRD
/
STRD
instructions.)
If you are using
LDRD
/
STRD
to access data objects defined in C or C++, you must use
__align(8)
to ensure that the data objects are properly aligned.
__align(8)
is a storage
class modifier. This means that it can be used only on top-level objects. You can not use
it on:
• types, such as typedefs, structure definitions
• function parameters.
It can be used in conjunction with
extern
and
static
.
__align(8)
only ensures that the
object is 8-byte aligned. This means, for example, that you must explicitly pad
structures if required.
Note
Output objects from a compilation or assembly are marked as requiring 8-byte
alignment in the following circumstances:
• you specify the
REQUIRE8
directive, because you are using
LDRD
and
STRD
instructions in your assembly language code
• you allow the compiler to generate
LDRD
and
STRD
instructions by specifying the
-Oldrd
option
• you use the
__align(8)
qualifier to set the alignment of an object to an eight byte
boundary.
These objects are unlikely to link with objects built with versions of ADS earlier than
1.1.
Angel moved to AFS
Angel is no longer shipped as part of ADS. Angel is now available as part of the ARM
Firmware Suite.