Datasheet
Differences
ARM DUI 0064D Copyright © 1999-2001 ARM Limited. All rights reserved. 2-17
connected. For example, the target can describe the number, name, and formatting
requirements of its coprocessor registers to AXD, and AXD modifies its interface to
represent the capabilities of the target.
Note
This means that AXD interface elements can change, depending on the target to which
it is connected.
Changes to memory alignment
ADS 1.1 ensures that stack data is always 8-byte aligned. The new ATPCS requires that
sp always points to 8-byte boundaries. Your assembly language code must preserve
8-byte alignment of the stack at all external interfaces.
In addition, the default implementations of
__user_initial_stackheap()
,
malloc()
,
calloc()
,
realloc()
, and
alloca()
now ensure that heap data is 8-byte aligned.
Impact
If you access stack data from assembly language you must ensure that you maintain
8-byte alignment of the stack at external interfaces.
If you have re-implemented the ARM C library default memory model, you must ensure
that you maintain 8-byte alignment of the heap. In particular, you must ensure that your
implementations of
__rt_heap_extend()
,
__user_heap_extend()
return 8-byte aligned
blocks of memory.
__HeapProvideMemory()
is allowed to assume 8-byte alignment. It is
recommended that your implementations of
__user_initial_stackheap()
,
__Heap_Alloc()
and
__Heap_Realloc()
maintain 8-byte alignment of heap memory.
If you use the
LDRD
or
STRD
instructions, you must ensure that the location accessed is
8-byte aligned. In ARM assembly language:
• you must set the alignment of any data section, or code section that contains data,
using the
ALIGN
attribute to the
AREA
directive.
• you must use the
ALIGN
directive to ensure that data structures are 8-byte aligned.
For example:
AREA example,CODE,ALIGN=3
;code
;code
my_struct DATA
ALIGN 8 ;aligned on 8 byte boundary
DCB 1,2,3,4,5,6,7,8