diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-08-20 08:33:40 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-08-27 09:35:11 -0700 |
commit | 7408c1ec242bd20f99509a80d2bde335876e4a29 (patch) | |
tree | 2a96e3eec767c6470ab3d9773c540ebed6f4441a | |
parent | 3882e4ba5b6a043a034b20b6001dda727cc45a80 (diff) | |
download | glibc-7408c1ec242bd20f99509a80d2bde335876e4a29.tar.gz glibc-7408c1ec242bd20f99509a80d2bde335876e4a29.tar.xz glibc-7408c1ec242bd20f99509a80d2bde335876e4a29.zip |
Add i386 rawmemchr multiarch functions
-rw-r--r-- | sysdeps/i386/i686/multiarch/Makefile | 1 | ||||
-rw-r--r-- | sysdeps/i386/multiarch/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/i386/multiarch/ifunc-impl-list.c | 4 | ||||
-rw-r--r-- | sysdeps/i386/multiarch/rawmemchr-sse2-bsf.S (renamed from sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S) | 0 | ||||
-rw-r--r-- | sysdeps/i386/multiarch/rawmemchr-sse2.S (renamed from sysdeps/i386/i686/multiarch/rawmemchr-sse2.S) | 0 | ||||
-rw-r--r-- | sysdeps/i386/multiarch/rawmemchr.S (renamed from sysdeps/i386/i686/multiarch/rawmemchr.S) | 14 | ||||
-rw-r--r-- | sysdeps/i386/multiarch/rtld-rawmemchr.S | 20 |
7 files changed, 31 insertions, 11 deletions
diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile index 0b91d00a0d..74333caee5 100644 --- a/sysdeps/i386/i686/multiarch/Makefile +++ b/sysdeps/i386/i686/multiarch/Makefile @@ -7,7 +7,6 @@ sysdep_routines += strcmp-ssse3 \ strncpy-sse2 stpcpy-sse2 stpncpy-sse2 strcat-ssse3 \ strcat-sse2 strncat-ssse3 strncat-sse2 strncat-c \ strchr-sse2 strrchr-sse2 strchr-sse2-bsf strrchr-sse2-bsf \ - rawmemchr-sse2 rawmemchr-sse2-bsf \ strnlen-sse2 strnlen-c \ strcasecmp_l-c strcasecmp-c strcasecmp_l-ssse3 \ strncase_l-c strncase-c strncase_l-ssse3 \ diff --git a/sysdeps/i386/multiarch/Makefile b/sysdeps/i386/multiarch/Makefile index fc9364fe65..8a9ecf3a3a 100644 --- a/sysdeps/i386/multiarch/Makefile +++ b/sysdeps/i386/multiarch/Makefile @@ -20,5 +20,6 @@ sysdep_routines += bcopy-i386 bcopy-i686 bcopy-sse2-unaligned \ memset-sse2 memset-sse2-rep \ memchr-sse2-bsf memchr-sse2 \ memcmp-i386 memcmp-i686 memcmp-ssse3 memcmp-sse4 \ - memrchr-i386 memrchr-sse2-bsf memrchr-sse2 + memrchr-i386 memrchr-sse2-bsf memrchr-sse2 \ + rawmemchr-sse2-bsf rawmemchr-sse2 endif diff --git a/sysdeps/i386/multiarch/ifunc-impl-list.c b/sysdeps/i386/multiarch/ifunc-impl-list.c index 15c2009e62..ce5abeb335 100644 --- a/sysdeps/i386/multiarch/ifunc-impl-list.c +++ b/sysdeps/i386/multiarch/ifunc-impl-list.c @@ -157,15 +157,15 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, #endif ) -#if 0 /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */ IFUNC_IMPL (i, name, rawmemchr, IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_CPU_FEATURE (SSE2), __rawmemchr_sse2_bsf) IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_CPU_FEATURE (SSE2), __rawmemchr_sse2) - IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_ia32)) + IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_i386)) +#if 0 /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */ IFUNC_IMPL (i, name, stpncpy, IFUNC_IMPL_ADD (array, i, stpncpy, HAS_CPU_FEATURE (SSSE3), diff --git a/sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S b/sysdeps/i386/multiarch/rawmemchr-sse2-bsf.S index 88c0e5776c..88c0e5776c 100644 --- a/sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S +++ b/sysdeps/i386/multiarch/rawmemchr-sse2-bsf.S diff --git a/sysdeps/i386/i686/multiarch/rawmemchr-sse2.S b/sysdeps/i386/multiarch/rawmemchr-sse2.S index 038c74896b..038c74896b 100644 --- a/sysdeps/i386/i686/multiarch/rawmemchr-sse2.S +++ b/sysdeps/i386/multiarch/rawmemchr-sse2.S diff --git a/sysdeps/i386/i686/multiarch/rawmemchr.S b/sysdeps/i386/multiarch/rawmemchr.S index 2cfbe1b3fc..27cc9f3b8b 100644 --- a/sysdeps/i386/i686/multiarch/rawmemchr.S +++ b/sysdeps/i386/multiarch/rawmemchr.S @@ -34,7 +34,7 @@ ENTRY(__rawmemchr) LOAD_FUNC_GOT_EAX (__rawmemchr_sse2) ret -2: LOAD_FUNC_GOT_EAX (__rawmemchr_ia32) +2: LOAD_FUNC_GOT_EAX (__rawmemchr_i386) ret 3: LOAD_FUNC_GOT_EAX (__rawmemchr_sse2_bsf) @@ -45,21 +45,21 @@ weak_alias(__rawmemchr, rawmemchr) # undef ENTRY # define ENTRY(name) \ - .type __rawmemchr_ia32, @function; \ - .globl __rawmemchr_ia32; \ + .type __rawmemchr_i386, @function; \ + .globl __rawmemchr_i386; \ .p2align 4; \ - __rawmemchr_ia32: cfi_startproc; \ + __rawmemchr_i386: cfi_startproc; \ CALL_MCOUNT # undef END # define END(name) \ - cfi_endproc; .size __rawmemchr_ia32, .-__rawmemchr_ia32 + cfi_endproc; .size __rawmemchr_i386, .-__rawmemchr_i386 # undef libc_hidden_def /* IFUNC doesn't work with the hidden functions in shared library since they will be called without setting up EBX needed for PLT which is used by IFUNC. */ # define libc_hidden_def(name) \ - .globl __GI___rawmemchr; __GI___rawmemchr = __rawmemchr_ia32 + .globl __GI___rawmemchr; __GI___rawmemchr = __rawmemchr_i386 #endif -#include "../../rawmemchr.S" +#include <sysdeps/i386/rawmemchr.S> diff --git a/sysdeps/i386/multiarch/rtld-rawmemchr.S b/sysdeps/i386/multiarch/rtld-rawmemchr.S new file mode 100644 index 0000000000..9d5c19632d --- /dev/null +++ b/sysdeps/i386/multiarch/rtld-rawmemchr.S @@ -0,0 +1,20 @@ +/* rawmemchr for ld.so + Copyright (C) 2015 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 + <http://www.gnu.org/licenses/>. */ + +#include <init-arch.h> +#include <sysdeps/i386/rawmemchr.S> |