Skip to content
Snippets Groups Projects
Commit b050f87d authored by Felix Fietkau's avatar Felix Fietkau
Browse files

gcc: prevent the use of LDRD/STRD on ARMv5TE


These instructions are for 64-bit load/store. On ARMv5TE, the CPU
requires addresses to be aligned to 64-bit. When misaligned, behavior is
undefined (effectively either loads the same word twice on LDRD, or
corrupts surrounding memory on STRD).

On ARMv6 and newer, unaligned access is safe.

Removing these instructions for ARMv5TE is necessary, because GCC
ignores alignment information in pointers and does unsafe optimizations
that have shown up as bugs in various places.

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

SVN-Revision: 39638
parent f433088d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment