[PATCH 0/1] LoongArch: Add optimized functions.

dengjianbo dengjianbo@loongson.cn
Fri Sep 2 08:39:07 GMT 2022


Tested on LoongArch machine 3A5000: gcc 12.1.0, Linux kernel 5.19.0 rc5, binutils 2.38.50, All cases are passed besides ifunc related tests, no new failed entry was introduced.

configure:
../configure  --prefix=/usr CFLAGS="-O2"

make bench, comparing with the improved generic version, test results can be found in following link:
 https://github.com/jiadengx/glibc/tree/main/make_bench
strchr
 About 30% faster than improved generic version, detailed info can be found from strchr_xls.png and graph-strchr.
 https://github.com/jiadengx/glibc/blob/main/make_bench/graph-strchr
 https://github.com/jiadengx/glibc/blob/main/make_bench/strchr_xls.png
strchrnul
 About 30% faster than improved generic version, detailed info can be found from strchrnul_xls.png and graph-strchrnul.
 https://github.com/jiadengx/glibc/blob/main/make_bench/graph-strchrnul
 https://github.com/jiadengx/glibc/blob/main/make_bench/strchrnul_xls.png
strcmp
 About 10% - 60% faster than improved generic version, detailed info can be found from strcmp_xls.png and graph-strcmp.
 https://github.com/jiadengx/glibc/blob/main/make_bench/graph-strcmp
 https://github.com/jiadengx/glibc/blob/main/make_bench/strcmp_xls.png
strncmp
 About 0% - 80% faster than generic version, detailed info can be found from strncmp_xls.png and graph-strncmp.
 https://github.com/jiadengx/glibc/blob/main/make_bench/graph-strncmp
 https://github.com/jiadengx/glibc/blob/main/make_bench/strncmp_xls.png
memmove
 About 5% - 60% faster than improved generic version, detailed info can be found from memmove_xls.png and graph-memmove.
 https://github.com/jiadengx/glibc/blob/main/make_bench/graph-memmove
 https://github.com/jiadengx/glibc/blob/main/make_bench/memmove_xls.png
dengjianbo (1):
  LoongArch: Add optimized functions.

 sysdeps/loongarch/lp64/memmove.S   | 491 +++++++++++++++++++++++++++++
 sysdeps/loongarch/lp64/strchr.S    | 145 +++++++++
 sysdeps/loongarch/lp64/strchrnul.S | 160 ++++++++++
 sysdeps/loongarch/lp64/strcmp.S    | 210 ++++++++++++
 sysdeps/loongarch/lp64/strncmp.S   | 281 +++++++++++++++++
 5 files changed, 1287 insertions(+)
 create mode 100644 sysdeps/loongarch/lp64/memmove.S
 create mode 100644 sysdeps/loongarch/lp64/strchr.S
 create mode 100644 sysdeps/loongarch/lp64/strchrnul.S
 create mode 100644 sysdeps/loongarch/lp64/strcmp.S
 create mode 100644 sysdeps/loongarch/lp64/strncmp.S

-- 
2.20.1



More information about the Libc-alpha mailing list