From bd7510cc6b7ea453c1bc1c12949174f6324a6bdc Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 20 Dec 2008 01:34:52 +0000 Subject: string/i386/strncpy: faster i386 version (same code size), testing code string/i386/*: formatiing and commentary tidying up --- libc/string/i386/strrchr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libc/string/i386/strrchr.c') 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__ -- cgit v1.2.3