User`s guide

C for DSP56800E
Data Alignment Requirements
126
Targeting MC56F83xx/DSP5685x Controllers
Structures — double-word boundaries if they contain 32-bit elements, or if an
inner structure itself is double-word aligned.
Arrays — the size of one array element.
Word and Byte Pointers
The alignment requirements explained above determine how the compiler uses
DSP56800E byte and word pointers to implement C pointer types. The compiler uses:
Word pointers for all structures
The SP to access the stack resident data of all types:
–Bytes
–Shorts
Longs
–Floats
Doubles
Any pointer variables
Word pointers to access:
–Shorts
Longs
Any pointer variables
Byte pointers for:
Single global or static byte variable, if accessed through a pointer using
X:(Rn)
Global or static array of byte variables
The compiler does not use pointers to access scalar global or static byte
variables directly by their addresses. Instead, it uses an instruction with a .BP
suffix:
MOVE[U].BP X:xxxx,<dest>
MOVE.BP <src>,X:xxxx
Reordering Data for Optimal Usage
The compiler changes data order, for optimal usage. The data reordering follows these
guidelines: