xref: /csrg-svn/lib/libc/tahoe/string/bcmp.s (revision 61190)
134438Sbostic/*
2*61190Sbostic * Copyright (c) 1988, 1993
3*61190Sbostic *	The Regents of the University of California.  All rights reserved.
434438Sbostic *
542643Sbostic * %sccs.include.redist.c%
634824Sbostic *
734438Sbostic * This code is derived from software contributed to Berkeley by
834438Sbostic * Computer Consoles Inc.
934438Sbostic */
1029692Ssam
1134438Sbostic#if defined(LIBC_SCCS) && !defined(lint)
12*61190Sbostic	.asciz "@(#)bcmp.s	8.1 (Berkeley) 06/04/93"
1334438Sbostic#endif /* LIBC_SCCS and not lint */
1434438Sbostic
1529692Ssam/* bcmp(s1, s2, n) */
1629692Ssam/* compare exactly 'n' */
1729692Ssam#include "DEFS.h"
1829692Ssam
1929692SsamENTRY(bcmp, 0)
2029692Ssam	movl	4(fp),r0
2129692Ssam	movl	8(fp),r1
2229692Ssam	mnegl	12(fp),r2
2329692Ssam	jeql	3f
2429692Ssam1:
2529692Ssam	cmpb	(r0),(r1)
2629692Ssam	jneq	2f
2729692Ssam	incl	r0
2829692Ssam	incl	r1
2929692Ssam	aoblss	$0,r2,1b
3029692Ssam3:
3129692Ssam	clrl	r0
3229692Ssam	ret
3329692Ssam2:
3429692Ssam	movl	$1,r0
3529692Ssam	ret
36