The data alignment rules for DSP56800E stack and global memory are:
- Bytes — byte boundaries.
- Words — word boundaries.
- Longs, floats, and doubles — double-word boundaries:
- Least significant word is always on an even word address.
- Most significant word is always on an odd word address.
- Long accesses through pointers in AGU registers (for example, R0 through R5 or N) point to the least significant word. That is, the address is even.
- Long accesses through pointers using SP point to the most significant word. That is, the address in SP is odd.
- Structures — word boundaries (not byte boundaries).
Note: A structure containing only bytes still is word aligned.
- 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.
This topic contains the following sub-topics: