Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-22 Thread Sedat Dilek
On Fri, Mar 22, 2019 at 8:17 AM Rasmus Villemoes wrote: > > On 21/03/2019 18.02, Nick Desaulniers wrote: > > On Wed, Mar 20, 2019 at 7:11 PM Andrew Morton > > wrote: > >> > > > > Further, I can drop some of the __GNUC__ < 4 code in > > arch/x86/include/asm/string_32.h. > > Already on its way to

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-22 Thread Rasmus Villemoes
On 21/03/2019 18.02, Nick Desaulniers wrote: > On Wed, Mar 20, 2019 at 7:11 PM Andrew Morton > wrote: >> > > Further, I can drop some of the __GNUC__ < 4 code in > arch/x86/include/asm/string_32.h. Already on its way to Linus:

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-21 Thread Andrew Morton
On Thu, 21 Mar 2019 10:02:37 -0700 Nick Desaulniers wrote: > Shall I send you a cleanup removing the undefs for bcmp, memcmp, > strcat, strcpy, and strcmp? Of those, I only see memcmp being > `#defined` in arch/m68k/include/asm/string.h, arch/x86/boot/string.h, > and

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-21 Thread Nick Desaulniers
On Thu, Mar 21, 2019 at 10:02 AM Nick Desaulniers wrote: > > On Wed, Mar 20, 2019 at 7:11 PM Andrew Morton > wrote: > > I guess we should backport this into -stable so that older kernels can > > be built with newer Clang. > > Ah, you're right. I always forget. Is it too late to add > > Cc:

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-21 Thread Nick Desaulniers
On Wed, Mar 20, 2019 at 7:11 PM Andrew Morton wrote: > > On Wed, 13 Mar 2019 14:13:31 -0700 Nick Desaulniers > wrote: > > > A recent optimization in Clang (r355672) lowers comparisons of the > > return value of memcmp against zero to comparisons of the return value > > of bcmp against zero.

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-20 Thread Andrew Morton
On Wed, 13 Mar 2019 14:13:31 -0700 Nick Desaulniers wrote: > A recent optimization in Clang (r355672) lowers comparisons of the > return value of memcmp against zero to comparisons of the return value > of bcmp against zero. This helps some platforms that implement bcmp > more efficiently than

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-14 Thread Rasmus Villemoes
On 14/03/2019 10.57, David Laight wrote: > From: Nick Desaulniers >> Sent: 13 March 2019 21:14 > ... >> diff --git a/include/linux/string.h b/include/linux/string.h >> index 7927b875f80c..6ab0a6fa512e 100644 >> --- a/include/linux/string.h >> +++ b/include/linux/string.h >> @@ -150,6 +150,9 @@

RE: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-14 Thread David Laight
From: Nick Desaulniers > Sent: 13 March 2019 21:14 ... > diff --git a/include/linux/string.h b/include/linux/string.h > index 7927b875f80c..6ab0a6fa512e 100644 > --- a/include/linux/string.h > +++ b/include/linux/string.h > @@ -150,6 +150,9 @@ extern void * memscan(void *,int,__kernel_size_t); >

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-14 Thread Andy Shevchenko
On Wed, Mar 13, 2019 at 02:13:31PM -0700, Nick Desaulniers wrote: > A recent optimization in Clang (r355672) lowers comparisons of the > return value of memcmp against zero to comparisons of the return value > of bcmp against zero. This helps some platforms that implement bcmp > more efficiently

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-13 Thread Masahiro Yamada
On Thu, Mar 14, 2019 at 6:13 AM Nick Desaulniers wrote: > > A recent optimization in Clang (r355672) lowers comparisons of the > return value of memcmp against zero to comparisons of the return value > of bcmp against zero. This helps some platforms that implement bcmp > more efficiently than

Re: [PATCH v4] lib/string.c: implement a basic bcmp

2019-03-13 Thread Nathan Chancellor
On Wed, Mar 13, 2019 at 02:13:31PM -0700, Nick Desaulniers wrote: > A recent optimization in Clang (r355672) lowers comparisons of the > return value of memcmp against zero to comparisons of the return value > of bcmp against zero. This helps some platforms that implement bcmp > more efficiently

[PATCH v4] lib/string.c: implement a basic bcmp

2019-03-13 Thread Nick Desaulniers
A recent optimization in Clang (r355672) lowers comparisons of the return value of memcmp against zero to comparisons of the return value of bcmp against zero. This helps some platforms that implement bcmp more efficiently than memcmp. glibc simply aliases bcmp to memcmp, but an optimized