Re: [PATCH] Makefile: Add '-fno-builtin-bcmp' to CLANG_FLAGS
From: Arnd Bergmann
Date: Wed Mar 13 2019 - 09:49:11 EST
On Wed, Mar 13, 2019 at 2:44 PM Nathan Chancellor
<natechancellor@xxxxxxxxx> wrote:
> On Wed, Mar 13, 2019 at 09:13:11AM +0100, Rasmus Villemoes wrote:
> > Wouldn't it be better to just define bcmp as an alias for memcmp? They
> > seem to have compatible prototypes, and then somebody might someday sit
> > down and implement some word-at-a-time version of bcmp making use of the
> > weaker guarantees about the return value to gain some performance. But I
> > suppose that can also be done later.
>
> Thank you much for the review, I didn't even realize this was possible :)
>
> I'd certainly like to explore it as that is what glibc does. How would
> you suggest going about it here?
I suggested a possible implementation (likely contains bugs) and
an alias for architectures that require strict alignment, see
https://bugs.llvm.org/show_bug.cgi?id=41035#c11
We could start out with just the alias.
Arnd