Efficient C for ARM
Unaligned Data Access
Examples
A load from a guaranteed alignment:
LDR Rd,[Ra]
A load from an unspecified alignment:
LDRB Rd,[Ra,#0] LDRB Rt,[Ra,#1] ORR Rd,Rd,Rt,LSL #8 LDRB Rt,[Ra,#2] ORR Rd,Rd,Rt,LSL #16 LDRB Rt,[Ra,#3] ORR Rd,Rd,Rt,LSL #24
Each byte must be individually fetched and merged into the result.

