aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/lib/string_32.c20
-rw-r--r--include/asm-x86/string_32.h3
2 files changed, 0 insertions, 23 deletions
diff --git a/arch/x86/lib/string_32.c b/arch/x86/lib/string_32.c
index 2c773fefa3dd..c2c0504a3071 100644
--- a/arch/x86/lib/string_32.c
+++ b/arch/x86/lib/string_32.c
@@ -160,26 +160,6 @@ char *strchr(const char * s, int c)
160EXPORT_SYMBOL(strchr); 160EXPORT_SYMBOL(strchr);
161#endif 161#endif
162 162
163#ifdef __HAVE_ARCH_STRRCHR
164char *strrchr(const char * s, int c)
165{
166 int d0, d1;
167 char * res;
168 asm volatile( "movb %%al,%%ah\n"
169 "1:\tlodsb\n\t"
170 "cmpb %%ah,%%al\n\t"
171 "jne 2f\n\t"
172 "leal -1(%%esi),%0\n"
173 "2:\ttestb %%al,%%al\n\t"
174 "jne 1b"
175 :"=g" (res), "=&S" (d0), "=&a" (d1)
176 :"0" (0),"1" (s),"2" (c)
177 :"memory");
178 return res;
179}
180EXPORT_SYMBOL(strrchr);
181#endif
182
183#ifdef __HAVE_ARCH_STRLEN 163#ifdef __HAVE_ARCH_STRLEN
184size_t strlen(const char * s) 164size_t strlen(const char * s)
185{ 165{
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h
index a9b64453bdf5..55bfa308f900 100644
--- a/include/asm-x86/string_32.h
+++ b/include/asm-x86/string_32.h
@@ -26,9 +26,6 @@ extern int strncmp(const char *cs, const char *ct, size_t count);
26#define __HAVE_ARCH_STRCHR 26#define __HAVE_ARCH_STRCHR
27extern char *strchr(const char *s, int c); 27extern char *strchr(const char *s, int c);
28 28
29#define __HAVE_ARCH_STRRCHR
30extern char *strrchr(const char *s, int c);
31
32#define __HAVE_ARCH_STRLEN 29#define __HAVE_ARCH_STRLEN
33extern size_t strlen(const char *s); 30extern size_t strlen(const char *s);
34 31