This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Rearrange little endian specific files
- From: Anton Blanchard <anton at ozlabs dot org>
- To: Rajalakshmi Srinivasaraghavan <raji at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Tue, 15 Jan 2019 14:02:00 +1100
- Subject: Re: [PATCH] powerpc: Rearrange little endian specific files
- References: <1534227122-24270-1-git-send-email-raji@linux.vnet.ibm.com>
Hi,
> This patch moves little endian specific POWER9 optimization files to
> sysdeps/powerpc/powerpc64/le and creates POWER9 ifunc functions
> only for little endian.
This patch causes a 70% regression in my strncmp test.
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
index c4a40d1ec7..9c887ee181 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncmp.c
@@ -29,14 +29,18 @@ extern __typeof (strncmp) __strncmp_ppc attribute_hidden;
extern __typeof (strncmp) __strncmp_power4 attribute_hidden;
extern __typeof (strncmp) __strncmp_power7 attribute_hidden;
extern __typeof (strncmp) __strncmp_power8 attribute_hidden;
+# ifdef __LITTLE_ENDIAN__
extern __typeof (strncmp) __strncmp_power9 attribute_hidden;
+# endif
# undef strncmp
/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
ifunc symbol properly. */
libc_ifunc_redirected (__redirect_strncmp, strncmp,
+# ifdef __LITTLE_ENDIAN_
(hwcap2 & PPC_FEATURE2_ARCH_3_00)
? __strncmp_power9 :
+# endif
(hwcap2 & PPC_FEATURE2_ARCH_2_07)
? __strncmp_power8
: (hwcap & PPC_FEATURE_HAS_VSX)
Typo: __LITTLE_ENDIAN_ should be __LITTLE_ENDIAN__
Thanks,
Anton