LoongArch: Add ifunc support for strrchr{aligned, lsx, lasx}
authordengjianbo <dengjianbo@loongson.cn>
Wed, 13 Sep 2023 07:35:00 +0000 (15:35 +0800)
committercaiyinyu <caiyinyu@loongson.cn>
Fri, 15 Sep 2023 01:07:47 +0000 (09:07 +0800)
commit24279aecf34a830a744038cb922d94b5a2d9c1cb
tree8412b585df3f8206103d1e9db8133a1de1043e54
parent06251002d4a1d92101ae7205be380887a4129471
LoongArch: Add ifunc support for strrchr{aligned, lsx, lasx}

According to glibc strrchr microbenchmark test results, this implementation
could reduce the runtime time as following:

Name                Percent of rutime reduced
strrchr-lasx        10%-50%
strrchr-lsx         0%-50%
strrchr-aligned     5%-50%

Generic strrchr is implemented by function strlen + memrchr, the lasx version
will compare with generic strrchr implemented by strlen-lasx + memrchr-lasx,
the lsx version will compare with generic strrchr implemented by strlen-lsx +
memrchr-lsx, the aligned version will compare with generic strrchr implemented
by strlen-aligned + memrchr-generic.
sysdeps/loongarch/lp64/multiarch/Makefile
sysdeps/loongarch/lp64/multiarch/ifunc-impl-list.c
sysdeps/loongarch/lp64/multiarch/ifunc-strrchr.h [new file with mode: 0644]
sysdeps/loongarch/lp64/multiarch/strrchr-aligned.S [new file with mode: 0644]
sysdeps/loongarch/lp64/multiarch/strrchr-lasx.S [new file with mode: 0644]
sysdeps/loongarch/lp64/multiarch/strrchr-lsx.S [new file with mode: 0644]
sysdeps/loongarch/lp64/multiarch/strrchr.c [new file with mode: 0644]