Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=61d08a9ea3d5fd680213aa7a15fcda69ce11987d
Commit:     61d08a9ea3d5fd680213aa7a15fcda69ce11987d
Parent:     883001f98290ca40b32e2c1872f22600f8dfc968
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 18:04:38 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:16:23 2007 +0200

    i386: Remove strrchr assembler implementation
    
    The constraints in the inline assembler implementation of i386
    strrchr() were incorrect and break the build with recent gcc 4.3.
    Since there are only very few callers of strrchr() and none of them
    are performance relevant just remove the assembler implementation
    and use the C fallback instead.
    
    [ tglx: arch/x86 adaptation ]
    
    Cc: [EMAIL PROTECTED]
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/lib/string_32.c    |   20 --------------------
 include/asm-x86/string_32.h |    3 ---
 2 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/arch/x86/lib/string_32.c b/arch/x86/lib/string_32.c
index 2c773fe..c2c0504 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)
 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)
 {
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h
index a9b6445..55bfa30 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);
 #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);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to