about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2021-04-30 18:12:08 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2021-04-30 18:12:08 -0300
commite941e0ae80626b7661c1db8953a673cafd3b8b19 (patch)
tree42b3dcccfce69af0f7ffb0fa4ed2ed75734b82a2 /sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
parentdd59655e9371af86043b97e38953f43bd9496699 (diff)
downloadglibc-e941e0ae80626b7661c1db8953a673cafd3b8b19.tar.gz
glibc-e941e0ae80626b7661c1db8953a673cafd3b8b19.tar.xz
glibc-e941e0ae80626b7661c1db8953a673cafd3b8b19.zip
powerpc64le: Optimize memcpy for POWER10
This implementation is based on __memcpy_power8_cached and integrates
suggestions from Anton Blanchard.
It benefits from loads and stores with length for short lengths and for
tail code, simplifying the code.

All unaligned memory accesses use instructions that do not generate
alignment interrupts on POWER10, making it safe to use on
caching-inhibited memory.

The main loop has also been modified in order to increase instruction
throughput by reducing the dependency on updates from previous iterations.

On average, this implementation provides around 30% improvement when
compared to __memcpy_power7 and 10% improvement in comparison to
__memcpy_power8_cached.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
index d00bcc8178..1ab56bb2c9 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
@@ -51,6 +51,12 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 #ifdef SHARED
   /* Support sysdeps/powerpc/powerpc64/multiarch/memcpy.c.  */
   IFUNC_IMPL (i, name, memcpy,
+#ifdef __LITTLE_ENDIAN__
+	      IFUNC_IMPL_ADD (array, i, memcpy,
+			      hwcap2 & PPC_FEATURE2_ARCH_3_1
+			      && hwcap & PPC_FEATURE_HAS_VSX,
+			      __memcpy_power10)
+#endif
 	      IFUNC_IMPL_ADD (array, i, memcpy, hwcap2 & PPC_FEATURE2_ARCH_2_07,
 			      __memcpy_power8_cached)
 	      IFUNC_IMPL_ADD (array, i, memcpy, hwcap & PPC_FEATURE_HAS_VSX,