User`s guide
C for DSP56800E
Data Alignment Requirements
125Targeting MC56F83xx/DSP5685x Controllers
{
EnterCritical();
c = a+b;
}
else {
EnterCritical();
c = b++;
}
return (b+c);
}
This example does not need to call the ‘ExitCritical’ macro because the compiler will
automatically clean up the extra inline assembly stack allocation.
Data Alignment Requirements
The data alignment rules for DSP56800E stack and global memory are:
• Bytes — byte boundaries.
Exception: bytes passed on the stack are always word-aligned, residing in the
lower bytes.
• 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.