mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
95fee37be4
Align implementation with memcpy and memmove where also remaining bytes are
copied via final switch case instead of using simple implementations which
loop. But this alignment has much stronger reason and definitely aligning
implementation is not the key point here. It is just good to have in mind
that the same technique is used already there.
In GCC 10, now -ftree-loop-distribute-patterns optimization is on at O2.
This optimization causes GCC to convert the while loop in memset.c into a
call to memset.
So this optimization is transforming a loop in a memset/memcpy into a call
to the function itself. This makes the memset implementation as recursive.
"-freestanding" option will disable the built-in library function but it
has been added in generic library implementation.
In default microblaze kernel defconfig we have CONFIG_OPT_LIB_FUNCTION
enabled so it will always pick optimized version of memset which is target
specific so we are replacing the while() loop with switch case to avoid
recursive memset call.
Issue with freestanding was already discussed in connection to commit
|
||
---|---|---|
.. | ||
ashldi3.c | ||
ashrdi3.c | ||
cmpdi2.c | ||
divsi3.S | ||
fastcopy.S | ||
libgcc.h | ||
lshrdi3.c | ||
Makefile | ||
memcpy.c | ||
memmove.c | ||
memset.c | ||
modsi3.S | ||
muldi3.c | ||
mulsi3.S | ||
uaccess_old.S | ||
ucmpdi2.c | ||
udivsi3.S | ||
umodsi3.S |