/	Copyright (c) 1984, 1986, 1987, 1988 AT&T
/	  All Rights Reserved

/	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
/	The copyright notice above does not evidence any
/	actual or intended publication of such source code.
	.file	"strlen.s"

	.ident	"@(#)libc-i386:libc-i386/gen/strlen.s	1.2"

	.globl	strlen
	.align	4

strlen:
	MCOUNT
	pushl	%edi		/ save register variables

	movl	8(%esp),%edi	/ string address
	xorl	%eax,%eax	/ %al = 0
	movl	$-1,%ecx	/ Start count backward from -1.
	repnz ; scab
	incl	%ecx		/ Chip pre-decrements.
	movl	%ecx,%eax	/ %eax = return values
	notl	%eax		/ Twos complement arith. rule.

	popl	%edi		/ restore register variables
	ret
