Article: AMD's Mobile Strategy
By: Exophase (exophase.delete@this.gmail.com), December 22, 2011 8:37 am
Room: Moderated Discussions
Wilco (Wilco.Dijkstra@ntlworld.com) on 12/21/11 wrote:
---------------------------
>In terms of padding overhead there is no difference between largest or smallest
>first. In any case for structures this won't matter on ARM64 as the smallest offset
>is a whopping 4KB! On Thumb-1 however it matters as the maximum offset for 8/16/32-bit
>loads is just 31/62/124. So smallest first has been best for a while.
>
>Wilco
>
Correct, the overhead is the same. But by having all the padding at the end instead of distributed within the structure it's easier to track the offsets manually (if you're making defines for ASM or something) and the spatial locality is a little better for cache usage.
I've never programmed for Thumb-1 and god willing never will. The closest I hope to come is converting it to ARM code that sucks a lot less. On the other hand, ldrd/strd only allow +/- 8bit immediate offsets in both ARM and Thumb-2 encodings so it'd make more sense to put them first.
---------------------------
>In terms of padding overhead there is no difference between largest or smallest
>first. In any case for structures this won't matter on ARM64 as the smallest offset
>is a whopping 4KB! On Thumb-1 however it matters as the maximum offset for 8/16/32-bit
>loads is just 31/62/124. So smallest first has been best for a while.
>
>Wilco
>
Correct, the overhead is the same. But by having all the padding at the end instead of distributed within the structure it's easier to track the offsets manually (if you're making defines for ASM or something) and the spatial locality is a little better for cache usage.
I've never programmed for Thumb-1 and god willing never will. The closest I hope to come is converting it to ARM code that sucks a lot less. On the other hand, ldrd/strd only allow +/- 8bit immediate offsets in both ARM and Thumb-2 encodings so it'd make more sense to put them first.