Enables alignment of global data.
Syntax
Arguments
None
Default
Define
None
Scope
This option is enabled by default when optimizing for speed (-opt speed or -opt nospace in the compiler command line).
In order to disable it, use -noalignglobals. If enabled when optimizing for size (-opt space or -opt nospeed), the option
has no effect.
Description
This option enables alignment of all global data.
The S12Z compiler can optimize either for code size (default) or for execution speed. Since the S12Z CPU data bus operates
on 32-bit address boundaries, one way to improve execution time is to ensure that accesses to global data are such that
the corresponding data transfer need not be split into two consecutive bus accesses. This can be accomplished by aligning
all 16-bit or wider global variables as follows:
- 16-bit: on a 2-byte boundary;
- 24-bit or more: on a 4-byte boundary.