summaryrefslogtreecommitdiff
path: root/lib/libc/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-12-29 17:34:56 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-12-29 17:34:56 +0000
commit4c6404324bce4863a5c4d158de318b6ac5dcf4be (patch)
tree05f6b36ad8e2d3e06e4a48d152dbc7a775227c11 /lib/libc/arch/i386
parent6710c152263dc2a62ceb7bd88ce7942a9e9333fc (diff)
don't use %ebx, that's what %edx is for; Andy Doran <ad@netbsd.org>
Diffstat (limited to 'lib/libc/arch/i386')
-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