mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-28 00:58:05 +08:00

Place smallest items first, as this makes them most easily addressable in Thumb architecture. 16-bit access instructions have a 5-bit offset field, which is interpreted as bytes, halfwords, or words depending on access size, so smaller fields have smaller range. Range is 0-31 times the access size. The mbedtls_ssl_context structure is too large to be fully easily accessed even for words, so reorder functional blocks to put more frequently-referenced fields in the first 128 bytes, reducing total code size. Signed-off-by: Kevin Bracey <kevin.bracey@arm.com>