about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/strspn-sse2.c
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2022-03-23 16:57:29 -0500
committerNoah Goldstein <goldstein.w.n@gmail.com>2022-03-25 11:46:13 -0500
commit9c8a6ad620b49a27120ecdd7049c26bf05900397 (patch)
treedbab6abeedc8f1ea007d5c8434646ce5bfe804bb /sysdeps/x86_64/multiarch/strspn-sse2.c
parent653358535280a599382cb6c77538a187dac6a87f (diff)
downloadglibc-9c8a6ad620b49a27120ecdd7049c26bf05900397.tar.gz
glibc-9c8a6ad620b49a27120ecdd7049c26bf05900397.tar.xz
glibc-9c8a6ad620b49a27120ecdd7049c26bf05900397.zip
x86: Remove strspn-sse2.S and use the generic implementation
The generic implementation is faster.

geometric_mean(N=20) of all benchmarks New / Original: .710

All string/memory tests pass.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/x86_64/multiarch/strspn-sse2.c')
-rw-r--r--sysdeps/x86_64/multiarch/strspn-sse2.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/strspn-sse2.c b/sysdeps/x86_64/multiarch/strspn-sse2.c
new file mode 100644
index 0000000000..61cc6cb0a5
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/strspn-sse2.c
@@ -0,0 +1,28 @@
+/* strspn.
+   Copyright (C) 2017-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#if IS_IN (libc)
+
+# include <sysdep.h>
+# define STRSPN __strspn_sse2
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(STRSPN)
+#endif
+
+#include <string/strspn.c>