1/* 2 * Copyright (c) 1988 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Computer Consoles Inc. 9 */ 10 11#if defined(LIBC_SCCS) && !defined(lint) 12 .asciz "@(#)bcmp.s 1.4 (Berkeley) 06/01/90" 13#endif /* LIBC_SCCS and not lint */ 14 15/* bcmp(s1, s2, n) */ 16/* compare exactly 'n' */ 17#include "DEFS.h" 18 19ENTRY(bcmp, 0) 20 movl 4(fp),r0 21 movl 8(fp),r1 22 mnegl 12(fp),r2 23 jeql 3f 241: 25 cmpb (r0),(r1) 26 jneq 2f 27 incl r0 28 incl r1 29 aoblss $0,r2,1b 303: 31 clrl r0 32 ret 332: 34 movl $1,r0 35 ret 36