macro and text revision (-mdoc version 3)
[unix-history] / usr / src / lib / libc / vax / string / bcmp.s
CommitLineData
586c39b1
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
493b70ca
KB
3 * All rights reserved.
4 *
019bea33 5 * %sccs.include.redist.c%
586c39b1
DF
6 */
7
f4f66d2c 8#if defined(LIBC_SCCS) && !defined(lint)
019bea33 9 .asciz "@(#)bcmp.s 5.6 (Berkeley) %G%"
f4f66d2c 10#endif /* LIBC_SCCS and not lint */
586c39b1 11
af1b5230
SL
12/* bcmp(s1, s2, n) */
13
14#include "DEFS.h"
15
dadab5a2 16ENTRY(bcmp, 0)
6d33fe28
KM
17 movl 4(ap),r1
18 movl 8(ap),r3
19 movl 12(ap),r4
201:
21 movzwl $65535,r0
22 cmpl r4,r0
23 jleq 2f
24 subl2 r0,r4
25 cmpc3 r0,(r1),(r3)
26 jeql 1b
27 addl2 r4,r0
28 ret
292:
30 cmpc3 r4,(r1),(r3)
af1b5230 31 ret