SPRAC21A June 2016 – June 2019 OMAP-L132 , OMAP-L138 , TDA2E , TDA2EG-17 , TDA2HF , TDA2HG , TDA2HV , TDA2LF , TDA2P-ABZ , TDA2P-ACD , TDA2SA , TDA2SG , TDA2SX , TDA3LA , TDA3LX , TDA3MA , TDA3MD , TDA3MV
Compiler can optimize a C code to produce unaligned access even if the native datatype used in of word size.
Example:
void
sub (int *a, int *b)
{
*b = (0xFFFF00FF & *b) | (*a & 0x0000FF00);
}
Produces the code below:
ldrb r3, [r0, #1] @ zero_extendqisi2
strb r3, [r1, #1]
To ensure that there is no byte or halfword access in the code, the below steps are recommended: