diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2015-06-29 17:47:01 +0200 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2015-08-20 09:53:36 +0200 |
commit | 0e974603c566e8e25ffcf8a86d214c400f111090 (patch) | |
tree | fc40bcc79e8bf8df9818fc6546e620db534fd679 /sysdeps/x86_64/multiarch | |
parent | 165308eb2c66542c88d002d63dc68df112f5c818 (diff) | |
download | glibc-0e974603c566e8e25ffcf8a86d214c400f111090.tar.gz |
Improve generic strpbrk.neleai/string-x64
Diffstat (limited to 'sysdeps/x86_64/multiarch')
-rw-r--r-- | sysdeps/x86_64/multiarch/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strcspn.S | 21 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strpbrk_sse2.c | 4 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strpbrk_sse2_late.c | 4 |
4 files changed, 14 insertions, 18 deletions
diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile index 05d5c9ba30..6996d128b2 100644 --- a/sysdeps/x86_64/multiarch/Makefile +++ b/sysdeps/x86_64/multiarch/Makefile @@ -19,7 +19,8 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 \ strcpy-sse2-unaligned strncpy-sse2-unaligned \ stpcpy-sse2-unaligned stpncpy-sse2-unaligned \ strcat-sse2-unaligned strncat-sse2-unaligned \ - strchr-sse2-no-bsf memcmp-ssse3 strstr-sse2-unaligned + strchr-sse2-no-bsf memcmp-ssse3 strstr-sse2-unaligned \ + strcspn_sse2 strpbrk_sse2 strcspn_sse2_late strpbrk_sse2_late ifeq (yes,$(config-cflags-sse4)) sysdep_routines += strcspn_sse42 strpbrk_sse42 strspn_sse42 diff --git a/sysdeps/x86_64/multiarch/strcspn.S b/sysdeps/x86_64/multiarch/strcspn.S index 95e882c443..4fe4974812 100644 --- a/sysdeps/x86_64/multiarch/strcspn.S +++ b/sysdeps/x86_64/multiarch/strcspn.S @@ -54,22 +54,9 @@ ENTRY(STRCSPN) leaq STRCSPN_SSE42(%rip), %rax 2: ret END(STRCSPN) - -# undef ENTRY -# define ENTRY(name) \ - .type STRCSPN_SSE2, @function; \ - .globl STRCSPN_SSE2; \ - .align 16; \ - STRCSPN_SSE2: cfi_startproc; \ - CALL_MCOUNT -# undef END -# define END(name) \ - cfi_endproc; .size STRCSPN_SSE2, .-STRCSPN_SSE2 #endif -#endif /* HAVE_SSE4_SUPPORT */ -#ifdef USE_AS_STRPBRK -#include "../strpbrk.S" -#else -#include "../strcspn.S" -#endif +#else /* HAVE_SSE4_SUPPORT */ +weak_alias (STRCSPN_SSE2, STRCSPN) +#endif /* HAVE_SSE4_SUPPORT */ +libc_hidden_builtin_def (STRCSPN) diff --git a/sysdeps/x86_64/multiarch/strpbrk_sse2.c b/sysdeps/x86_64/multiarch/strpbrk_sse2.c new file mode 100644 index 0000000000..317f4fa839 --- /dev/null +++ b/sysdeps/x86_64/multiarch/strpbrk_sse2.c @@ -0,0 +1,4 @@ +#define STRPBRK __strpbrk_sse2 +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(x) +#include "string/strpbrk.c" diff --git a/sysdeps/x86_64/multiarch/strpbrk_sse2_late.c b/sysdeps/x86_64/multiarch/strpbrk_sse2_late.c new file mode 100644 index 0000000000..f2e1c4d5f7 --- /dev/null +++ b/sysdeps/x86_64/multiarch/strpbrk_sse2_late.c @@ -0,0 +1,4 @@ +#define STRPBRK __strpbrk_sse2_late +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(x) +#include "string/strpbrk.c" |