This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][powerpc] Fix tiny bug in strncmp.c
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 15 Jan 2019 17:21:24 -0200
- Subject: Re: [PATCH][powerpc] Fix tiny bug in strncmp.c
- References: <ad7190f2-a310-ae7e-8be3-7b460d9b372c@us.ibm.com>
On 15/01/2019 16:42, Paul Clarke wrote:
> A single underscore was omitted in
> sysdeps/powerpc/powerpc64/multiarch/strncmp.c, resulting in use of
> power8 version of strncmp instead of power9 version, with significant
> performance degradation.
>
> 2019-01-15 Paul A. Clarke <pc@us.ibm.com>
>
> * sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Fix #ifdef.
>
> diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
> index ab7379d..d2791ce 100644
> --- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
> +++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
> @@ -37,7 +37,7 @@ extern __typeof (strncmp) __strncmp_power9 attribute_hidden;
> /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
> ifunc symbol properly. */
> libc_ifunc_redirected (__redirect_strncmp, strncmp,
> -# ifdef __LITTLE_ENDIAN_
> +# ifdef __LITTLE_ENDIAN__
> (hwcap2 & PPC_FEATURE2_ARCH_3_00)
> ? __strncmp_power9 :
> # endif
>
LGTM, thanks.