On Mon, 9 Jul 2012, Eric Sandeen wrote:
On 7/9/12 9:45 AM, Gordan Bobic wrote:
[...]
Maybe I should know, but what happens on < ARMv7+ ? Memory corruption? If so I'm surprised that extN doesn't fall down all over the place today.
From ARMv6 and above, "simple" unaligned accesses are handled by the
hardware. By "simple" I mean word sized i.e. no LDM/STM, no LDRD/STRD.
- Detect sizeof(int) and declare the arrays as a suitable multiple
of that. int _should_ be word sized on most things AFAIK.
now I'll sound really dense, but isn't 4096 a multiple of sizeof(int) on arm?
A char array doesn't have the same alignment constraints as an int.
It's not the size but the type used that matters.
Nicolas