about summary refs log tree commit diff
path: root/sysdeps/loongarch/lp64/multiarch/Makefile
diff options
context:
space:
mode:
authordengjianbo <dengjianbo@loongson.cn>2023-09-13 15:34:59 +0800
committercaiyinyu <caiyinyu@loongson.cn>2023-09-15 09:07:47 +0800
commit06251002d4a1d92101ae7205be380887a4129471 (patch)
tree1fe85f72cba92d737ff3593f66a266b843c21ce7 /sysdeps/loongarch/lp64/multiarch/Makefile
parentc6c73e136a51d2372d108fb411e8418593aa79ca (diff)
downloadglibc-06251002d4a1d92101ae7205be380887a4129471.tar.gz
glibc-06251002d4a1d92101ae7205be380887a4129471.tar.xz
glibc-06251002d4a1d92101ae7205be380887a4129471.zip
LoongArch: Add ifunc support for strcpy, stpcpy{aligned, unaligned, lsx, lasx}
According to glibc strcpy and stpcpy microbenchmark test results(changed
to use generic_strcpy and generic_stpcpy instead of strlen + memcpy),
comparing with the generic version, this implementation could reduce the
runtime as following:

Name              Percent of rutime reduced
strcpy-aligned    8%-45%
strcpy-unaligned  8%-48%, comparing with the aligned version, unaligned
                  version takes less instructions to copy the tail of data
		  which length is less than 8. it also has better performance
		  in case src and dest cannot be both aligned with 8bytes
strcpy-lsx        20%-80%
strcpy-lasx       15%-86%
stpcpy-aligned    6%-43%
stpcpy-unaligned  8%-48%
stpcpy-lsx        10%-80%
stpcpy-lasx       10%-87%
Diffstat (limited to 'sysdeps/loongarch/lp64/multiarch/Makefile')
-rw-r--r--sysdeps/loongarch/lp64/multiarch/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/loongarch/lp64/multiarch/Makefile b/sysdeps/loongarch/lp64/multiarch/Makefile
index 360a6718c0..39550bea9b 100644
--- a/sysdeps/loongarch/lp64/multiarch/Makefile
+++ b/sysdeps/loongarch/lp64/multiarch/Makefile
@@ -16,6 +16,14 @@ sysdep_routines += \
   strcmp-lsx \
   strncmp-aligned \
   strncmp-lsx \
+  strcpy-aligned \
+  strcpy-unaligned \
+  strcpy-lsx \
+  strcpy-lasx \
+  stpcpy-aligned \
+  stpcpy-unaligned \
+  stpcpy-lsx \
+  stpcpy-lasx \
   memcpy-aligned \
   memcpy-unaligned \
   memmove-unaligned \