| |||
| Home > Introduction > ARM architecture v6 support > Alignment support | |||
By default the compiler utilizes ARMv6 unaligned access support
to speed up access to packed structures, by enabling an LDR (or STR)
to load from (or store to) a non-word aligned address (see Example 2 - instructions generated
for packed structures). Structures
remain non-packed unless explicitly qualified with __packed.
Code compiled for ARMv6 only runs correctly if you enable unaligned support on the ARM core. You must do this by setting the U bit (bit 22) of CP15 register 1 in your initialization code, or by tying the UBITINIT input to the core HIGH.
Code that uses the pre-ARMv6 unaligned accesses behavior can be generated by using the compiler option:
--memaccess -UL41