patch-2.2.0-pre9 linux/include/asm-i386/string.h
Next file: linux/include/asm-i386/unistd.h
Previous file: linux/include/asm-i386/smp.h
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Tue Jan 19 11:03:29 1999
- Orig file:
v2.2.0-pre8/linux/include/asm-i386/string.h
- Orig date:
Tue Jan 19 11:32:53 1999
diff -u --recursive --new-file v2.2.0-pre8/linux/include/asm-i386/string.h linux/include/asm-i386/string.h
@@ -188,35 +188,6 @@
return __res;
}
-#define __HAVE_ARCH_STRSTR
-extern inline char * strstr(const char * cs,const char * ct)
-{
-int d0, d1, d2, d3, d4;
-register char * __res;
-__asm__ __volatile__(
- "cld\n\t" \
- "movl %8,%%edi\n\t"
- "repne\n\t"
- "scasb\n\t"
- "notl %%ecx\n\t"
- "decl %%ecx\n\t" /* NOTE! This also sets Z if searchstring='' */
- "movl %%ecx,%%edx\n"
- "1:\tmovl %8,%%edi\n\t"
- "movl %%esi,%%eax\n\t"
- "movl %%edx,%%ecx\n\t"
- "repe\n\t"
- "cmpsb\n\t"
- "je 2f\n\t" /* also works for empty string, see above */
- "xchgl %%eax,%%esi\n\t"
- "incl %%esi\n\t"
- "cmpb $0,-1(%%eax)\n\t"
- "jne 1b\n\t"
- "xorl %%eax,%%eax\n\t"
- "2:"
- :"=a" (__res), "=&c" (d0), "=&S" (d1), "=&d" (d2), "=&D" (d3), "=&g" (d4) : "0" (0),"1" (0xffffffff),"2" (cs),"4" (ct));
-return __res;
-}
-
#define __HAVE_ARCH_STRLEN
extern inline size_t strlen(const char * s)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov