

/*
 * fast clear that optimizes string instructions
 */

	.text
	.globl	_bzero
_bzero:	movd	4(sp),r1	/* addr */
	movd	8(sp),r0	/* bount */
	ashd	$-2,r0		/* int count */
	cmpqd	0,r0
	bge	bz2b		/* < 1 double */
	addqd	-1,r0
	movqd	0,0(r1)
	addr	4(r1),r2
	movsd
	movd	r2,r1
bz2b:	movqd	3,r0
	andb	8(sp),r0	/* remaining bytes */
	cmpqd	0,r0
	bne	bz2b2
	ret	0
bz2b2:	movqb	0,0(r1)
	addqd	1,r1
	acbd	-1,r0,bz2b2
	ret	0
