From 02cea47161c00969afa985e641f4ac376f84d35f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 4 Aug 2009 12:13:43 -0700 Subject: Add x86 32-bit SSE4.2 string functions. This patch adds 32bit SSE4.2 string functions. It uses -16L instead of 0xfffffffffffffff0L, which works for both 32bit and 64bit long. Tested on 32bit Core i7 and Core 2. --- sysdeps/i386/i686/multiarch/strstr-c.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sysdeps/i386/i686/multiarch/strstr-c.c (limited to 'sysdeps/i386/i686/multiarch/strstr-c.c') diff --git a/sysdeps/i386/i686/multiarch/strstr-c.c b/sysdeps/i386/i686/multiarch/strstr-c.c new file mode 100644 index 0000000000..7ef1157ce4 --- /dev/null +++ b/sysdeps/i386/i686/multiarch/strstr-c.c @@ -0,0 +1,12 @@ +#include "init-arch.h" + +#define STRSTR __strstr_ia32 +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(name) \ + __hidden_ver1 (__strstr_ia32, __GI_strstr, __strstr_ia32); + +#include "string/strstr.c" + +extern char *__strstr_sse42 (const char *, const char *); + +libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_ia32); -- cgit v1.2.3-70-g09d2