1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8#if defined(LIBC_SCCS) && !defined(lint) 9 .asciz "@(#)bcmp.s 8.1 (Berkeley) 06/04/93" 10#endif /* LIBC_SCCS and not lint */ 11 12/* bcmp(s1, s2, n) */ 13 14#include "DEFS.h" 15 16ENTRY(bcmp, 0) 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) 31 ret 32