Home | History | Annotate | Line # | Download | only in string
      1  1.3     skrll /*	$NetBSD: bcmp.S,v 1.3 2020/05/05 06:20:55 skrll Exp $	*/
      2  1.1  fredette 
      3  1.1  fredette /*	$OpenBSD: bcmp.S,v 1.3 2001/06/04 23:14:02 mickey Exp $	*/
      4  1.1  fredette 
      5  1.1  fredette /*
      6  1.1  fredette  * Copyright 1996 1995 by Open Software Foundation, Inc.
      7  1.1  fredette  *              All Rights Reserved
      8  1.1  fredette  *
      9  1.1  fredette  * Permission to use, copy, modify, and distribute this software and
     10  1.1  fredette  * its documentation for any purpose and without fee is hereby granted,
     11  1.1  fredette  * provided that the above copyright notice appears in all copies and
     12  1.1  fredette  * that both the copyright notice and this permission notice appear in
     13  1.1  fredette  * supporting documentation.
     14  1.1  fredette  *
     15  1.1  fredette  * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
     16  1.1  fredette  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     17  1.1  fredette  * FOR A PARTICULAR PURPOSE.
     18  1.1  fredette  *
     19  1.1  fredette  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
     20  1.1  fredette  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     21  1.1  fredette  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
     22  1.1  fredette  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
     23  1.1  fredette  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     24  1.1  fredette  */
     25  1.1  fredette /*
     26  1.1  fredette  *  (c) Copyright 1988 HEWLETT-PACKARD COMPANY
     27  1.1  fredette  *
     28  1.1  fredette  *  To anyone who acknowledges that this file is provided "AS IS"
     29  1.1  fredette  *  without any express or implied warranty:
     30  1.1  fredette  *      permission to use, copy, modify, and distribute this file
     31  1.1  fredette  *  for any purpose is hereby granted without fee, provided that
     32  1.1  fredette  *  the above copyright notice and this notice appears in all
     33  1.1  fredette  *  copies, and that the name of Hewlett-Packard Company not be
     34  1.1  fredette  *  used in advertising or publicity pertaining to distribution
     35  1.1  fredette  *  of the software without specific, written prior permission.
     36  1.1  fredette  *  Hewlett-Packard Company makes no representations about the
     37  1.1  fredette  *  suitability of this software for any purpose.
     38  1.1  fredette  */
     39  1.1  fredette /*
     40  1.1  fredette  * Copyright (c) 1990,1991,1994 The University of Utah and
     41  1.1  fredette  * the Computer Systems Laboratory (CSL).  All rights reserved.
     42  1.1  fredette  *
     43  1.1  fredette  * THE UNIVERSITY OF UTAH AND CSL PROVIDE THIS SOFTWARE IN ITS "AS IS"
     44  1.1  fredette  * CONDITION, AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
     45  1.1  fredette  * WHATSOEVER RESULTING FROM ITS USE.
     46  1.1  fredette  *
     47  1.1  fredette  * CSL requests users of this software to return to csl-dist (at) cs.utah.edu any
     48  1.1  fredette  * improvements that they make and grant CSL redistribution rights.
     49  1.1  fredette  *
     50  1.1  fredette  * 	Utah Hdr: movc.s 1.26 94/12/14
     51  1.1  fredette  */
     52  1.1  fredette 
     53  1.1  fredette #include <machine/asm.h>
     54  1.1  fredette 
     55  1.1  fredette #ifdef SYSLIBC_SCCS
     56  1.1  fredette 	.text
     57  1.1  fredette 	.asciz "$OpenBSD: bcmp.S,v 1.3 2001/06/04 23:14:02 mickey Exp $"
     58  1.1  fredette 	.align	4
     59  1.1  fredette #endif
     60  1.1  fredette 
     61  1.1  fredette /*
     62  1.1  fredette  * int
     63  1.1  fredette  * bcmp(src, dst, count)
     64  1.2      matt  *	vaddr_t	src;
     65  1.2      matt  *	vaddr_t	dst;
     66  1.2      matt  *	size_t	count;
     67  1.1  fredette  */
     68  1.1  fredette LEAF_ENTRY(bcmp)
     69  1.2      matt         comb,>= %r0,%arg2,$bcmp_exit
     70  1.2      matt 	copy	%t1,%t2
     71  1.1  fredette 
     72  1.2      matt $bcmp_loop:
     73  1.2      matt 	ldbs,ma	1(%arg0),%t1
     74  1.2      matt 	ldbs,ma	1(%arg1),%t2
     75  1.2      matt 	comb,<>,n %t1,%t2,$bcmp_exit
     76  1.2      matt 	addib,<> -1,%arg2,$bcmp_loop
     77  1.3     skrll 	 nop
     78  1.1  fredette 
     79  1.2      matt $bcmp_exit:
     80  1.2      matt 	bv	0(%r2)
     81  1.3     skrll 	 sub	%t1,%t2,%ret0
     82  1.1  fredette 
     83  1.1  fredette EXIT(bcmp)
     84  1.1  fredette 
     85