diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2020-03-18 14:43:40 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2020-03-18 14:43:40 +0000 |
commit | 63bda3a85d9639fa9672ff1d4883c147a81e58a5 (patch) | |
tree | d8f4389a64acc92583e4e7d04a0535c1fc11bc9a /gcc/calls.c | |
parent | 3081f59a48222850f51c24b85fbd6c7fc29e90b0 (diff) |
WIP: equivalent of LLVM's -arm-assume-misaligned-load-storelinaro-local/arm-assume-misaligned-load-store
I've received a support request where GCC generates strd/ldrd which
require aligned memory addresses, while the user code actually
provides sub-aligned pointers.
The sample code is derived from CMSIS:
void foo(short *pDst, int in1, int in2) {
*__SIMD32(pDst)++ = in1;
*__SIMD32(pDst)++ = in2;
}
compiled with arm-none-eabi-gcc -mcpu=cortex-m7 CMSIS.c -S -O2
generates:
foo:
strd r1, r2, [r0]
bx lr
Using -mno-unaligned-access of course makes no change, since the code
is lying to the compiler by casting short* to int*.
However, LLVM has -arm-assume-misaligned-load-store which disables
generation of ldrd/strd in such cases:
https://reviews.llvm.org/D17015?id=48020
Change-Id: I576cbe22d6a109da4bb3bc5bda255dad4cc75ff8
Diffstat (limited to 'gcc/calls.c')
0 files changed, 0 insertions, 0 deletions