diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-20 01:34:52 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-20 01:34:52 +0000 |
commit | bd7510cc6b7ea453c1bc1c12949174f6324a6bdc (patch) | |
tree | 60cc6c9ef264264b208b3b70a7a2f54fc986fde4 /libc/string/i386/strrchr.c | |
parent | a0da3cfbbff226c7792be30e2bb277386e7cd086 (diff) |
string/i386/strncpy: faster i386 version (same code size), testing code
string/i386/*: formatiing and commentary tidying up
Diffstat (limited to 'libc/string/i386/strrchr.c')
-rw-r--r-- | libc/string/i386/strrchr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/string/i386/strrchr.c b/libc/string/i386/strrchr.c index 3209b1d76..9f2c74923 100644 --- a/libc/string/i386/strrchr.c +++ b/libc/string/i386/strrchr.c @@ -35,23 +35,23 @@ /* Experimentally off - libc_hidden_proto(strrchr) */ char *strrchr(const char *s, int c) { - char *retval; + char *eax; __asm__ __volatile__( " movb %%cl, %%ch\n" "1: movb (%1), %%cl\n" /* load char */ " cmpb %%cl, %%ch\n" /* char == c? */ " jne 2f\n" - " movl %1, %0\n" + " movl %1, %%eax\n" "2: incl %1\n" " testb %%cl, %%cl\n" /* char == NUL? */ " jnz 1b\n" /* "=c": use ecx, not ebx (-fpic uses it). */ - : "=a" (retval), "=r" (s), "=c" (c) + : "=a" (eax), "=r" (s), "=c" (c) : "0" (0), "1" (s), "2" (c) /* : no clobbers */ ); - return retval; + return eax; } libc_hidden_def(strrchr) #ifdef __UCLIBC_SUSV3_LEGACY__ |