Unaligned access exception
Hello,
we have "packet" structs in array. This mean, that pointer to individual struct is unaligned. Cortex-A and Cortex-R support unaligned access (if SCTLR.A is 0)
Problem is that compiler make optimizations. One optimization is read/write two following 32bit values by instruction LDRD/STRD instruction.
But it is problem, Cortex-A/R did support unaligned access for LDR/STR but not for LDRD/STRD. In another word ARMv7 implementation support unaligned data accesses only by some load and store instructions. This mean that we need disable this optimization selectively for this usage only, or tell compiler: "this pointer is unaligned" But how?
See to ARM document ARM DDI 0406C.b ID072512 Chapter A3.2.1 Unaligned data access Table A3-1 Alignment requirements of load/store instructions
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- jdobry
- Solved:
- Last query:
- Last reply: