summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2000-12-29 17:34:55 +0000
committermickey <mickey@openbsd.org>2000-12-29 17:34:55 +0000
commit7d0de8f40ea64194225bac417a9904e348197792 (patch)
treed32d7a103f9e496f5eaf0510ae69522ae42b46df
parentkiss in the rng; all those evil voices kept me pushing for it... (diff)
downloadwireguard-openbsd-7d0de8f40ea64194225bac417a9904e348197792.tar.xz
wireguard-openbsd-7d0de8f40ea64194225bac417a9904e348197792.zip
don't use %ebx, that's what %edx is for; Andy Doran <ad@netbsd.org>
-rw-r--r--lib/libc/arch/i386/string/index.S14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/arch/i386/string/index.S b/lib/libc/arch/i386/string/index.S
index c4a14b66f6e..362f6f4da20 100644
--- a/lib/libc/arch/i386/string/index.S
+++ b/lib/libc/arch/i386/string/index.S
@@ -7,7 +7,7 @@
#if defined(LIBC_SCCS)
.text
- .asciz "$OpenBSD: index.S,v 1.2 1996/08/19 08:12:59 tholo Exp $"
+ .asciz "$OpenBSD: index.S,v 1.3 2000/12/29 17:34:55 mickey Exp $"
#endif
#ifdef STRCHR
@@ -15,18 +15,16 @@ ENTRY(strchr)
#else
ENTRY(index)
#endif
- pushl %ebx
- movl 8(%esp),%eax
- movb 12(%esp),%cl
+ movl 4(%esp),%eax
+ movb 8(%esp),%cl
.align 2,0x90
L1:
- movb (%eax),%bl
- cmpb %bl,%cl /* found char??? */
+ movb (%eax),%dl
+ cmpb %dl,%cl /* found char??? */
je L2
incl %eax
- testb %bl,%bl /* null terminator??? */
+ testb %dl,%dl /* null terminator??? */
jnz L1
xorl %eax,%eax
L2:
- popl %ebx
ret