Displaying 2 results from an estimated 2 matches for "memcpy_silly".
2020 Jul 21
2
[ARM] Should Use Load and Store with Register Offset
...e is larger, execution *could* be slower,
and there's no improvement in register utilization over GCC.
I wanted to try a couple other variants of memcpy-like functions. The
https://godbolt.org/z/d7P6rG link includes memcpy_alt2 which copies data
from src to dst starting at the high address and memcpy_silly which copies
src to dst<0-4>. Here is the behavior I have noticed from GCC and Clang.
*memcpy_alt2*
- With -Os, GCC generates just 6 instructions. -O2 generates 7 but
reduces branching to once per loop.
- Clang with -Os or -O2 does a decent job of using a common register to
offs...
2020 Jul 20
2
[ARM] Should Use Load and Store with Register Offset
Hello LLVM Community (specifically anyone working with ARM Cortex-M),
While trying to compile the Newlib C library I found that Clang10 was
generating slightly larger binaries than the libc from the prebuilt
gcc-arm-none-eabi toolchain. I looked at a few specific functions (memcpy,
strcpy, etc.) and noticed that LLVM does not tend to generate load/store
instructions with a register offset (e.g.