about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/strrchr-evex512.S
diff options
context:
space:
mode:
authorSunil K Pandey <skpgkp2@gmail.com>2022-08-09 07:57:29 -0700
committerSunil K Pandey <skpgkp2@gmail.com>2022-11-03 15:51:52 -0700
commitfaaf733f49211439475e50f06716b303ee2644bf (patch)
tree3dd19a3b1d40d31f72cb063a05ad86dc273555d8 /sysdeps/x86_64/multiarch/strrchr-evex512.S
parent1f34a2328890aa192141f96449d25b77f666bf47 (diff)
downloadglibc-faaf733f49211439475e50f06716b303ee2644bf.tar.gz
glibc-faaf733f49211439475e50f06716b303ee2644bf.tar.xz
glibc-faaf733f49211439475e50f06716b303ee2644bf.zip
x86_64: Implement evex512 version of strrchr and wcsrchr
Changes from v1:
  Use vec api for register.
  Replace VPCMP with VPCMPEQ
  Restructure and remove 1 unconditional jump.
  Change page cross logic to use sall.

This patch implements following evex512 version of string functions.
evex512 version takes up to 30% less cycle as compared to evex,
depending on length and alignment.

- strrchr function using 512 bit vectors.
- wcsrchr function using 512 bit vectors.

Code size data:

strrchr-evex.o		879 byte
strrchr-evex512.o	601 byte (-32%)

wcsrchr-evex.o		882 byte
wcsrchr-evex512.o	572 byte (-35%)

Placeholder function, not used by any processor at the moment.

Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/x86_64/multiarch/strrchr-evex512.S')
-rw-r--r--sysdeps/x86_64/multiarch/strrchr-evex512.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/strrchr-evex512.S b/sysdeps/x86_64/multiarch/strrchr-evex512.S
new file mode 100644
index 0000000000..7d81e66375
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/strrchr-evex512.S
@@ -0,0 +1,8 @@
+# ifndef STRRCHR
+#  define STRRCHR	__strrchr_evex512
+# endif
+
+#include "x86-evex512-vecs.h"
+#include "reg-macros.h"
+
+#include "strrchr-evex-base.S"