From 653358535280a599382cb6c77538a187dac6a87f Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Wed, 23 Mar 2022 16:57:27 -0500 Subject: x86: Remove strpbrk-sse2.S and use the generic implementation The generic implementation is faster (see strcspn commit). All string/memory tests pass. Reviewed-by: H.J. Lu --- sysdeps/x86_64/multiarch/strpbrk-sse2.S | 29 ----------------------------- sysdeps/x86_64/multiarch/strpbrk-sse2.c | 28 ++++++++++++++++++++++++++++ sysdeps/x86_64/strpbrk.S | 3 --- 3 files changed, 28 insertions(+), 32 deletions(-) delete mode 100644 sysdeps/x86_64/multiarch/strpbrk-sse2.S create mode 100644 sysdeps/x86_64/multiarch/strpbrk-sse2.c delete mode 100644 sysdeps/x86_64/strpbrk.S (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/multiarch/strpbrk-sse2.S b/sysdeps/x86_64/multiarch/strpbrk-sse2.S deleted file mode 100644 index d537b6c27b..0000000000 --- a/sysdeps/x86_64/multiarch/strpbrk-sse2.S +++ /dev/null @@ -1,29 +0,0 @@ -/* strpbrk optimized with SSE2. - 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 - . */ - -#if IS_IN (libc) - -# include -# define strcspn __strpbrk_sse2 - -# undef libc_hidden_builtin_def -# define libc_hidden_builtin_def(strpbrk) -#endif - -#define USE_AS_STRPBRK -#include diff --git a/sysdeps/x86_64/multiarch/strpbrk-sse2.c b/sysdeps/x86_64/multiarch/strpbrk-sse2.c new file mode 100644 index 0000000000..d03214c4fb --- /dev/null +++ b/sysdeps/x86_64/multiarch/strpbrk-sse2.c @@ -0,0 +1,28 @@ +/* strpbrk. + 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 + . */ + +#if IS_IN (libc) + +# include +# define STRPBRK __strpbrk_sse2 + +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(STRPBRK) +#endif + +#include diff --git a/sysdeps/x86_64/strpbrk.S b/sysdeps/x86_64/strpbrk.S deleted file mode 100644 index 21888a5b92..0000000000 --- a/sysdeps/x86_64/strpbrk.S +++ /dev/null @@ -1,3 +0,0 @@ -#define strcspn strpbrk -#define USE_AS_STRPBRK -#include -- cgit 1.4.1