Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70992
b: refs/heads/master
c: 61d08a9
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Thomas Gleixner committed Oct 17, 2007
1 parent 29d6e8e commit b00beea
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 883001f98290ca40b32e2c1872f22600f8dfc968
refs/heads/master: 61d08a9ea3d5fd680213aa7a15fcda69ce11987d
20 changes: 0 additions & 20 deletions trunk/arch/x86/lib/string_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,26 +160,6 @@ char *strchr(const char * s, int c)
EXPORT_SYMBOL(strchr);
#endif

#ifdef __HAVE_ARCH_STRRCHR
char *strrchr(const char * s, int c)
{
int d0, d1;
char * res;
asm volatile( "movb %%al,%%ah\n"
"1:\tlodsb\n\t"
"cmpb %%ah,%%al\n\t"
"jne 2f\n\t"
"leal -1(%%esi),%0\n"
"2:\ttestb %%al,%%al\n\t"
"jne 1b"
:"=g" (res), "=&S" (d0), "=&a" (d1)
:"0" (0),"1" (s),"2" (c)
:"memory");
return res;
}
EXPORT_SYMBOL(strrchr);
#endif

#ifdef __HAVE_ARCH_STRLEN
size_t strlen(const char * s)
{
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/asm-x86/string_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ extern int strncmp(const char *cs, const char *ct, size_t count);
#define __HAVE_ARCH_STRCHR
extern char *strchr(const char *s, int c);

#define __HAVE_ARCH_STRRCHR
extern char *strrchr(const char *s, int c);

#define __HAVE_ARCH_STRLEN
extern size_t strlen(const char *s);

Expand Down

0 comments on commit b00beea

Please sign in to comment.