diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-02-25 17:30:29 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-02-25 17:30:29 +0000 |
commit | 79d3742f53ce7e64177630ab4e9bccc273821db4 (patch) | |
tree | c74ae2e753c47d6567f92f2f3e379003319bb2f5 /lib | |
parent | dfdcba5eddc82b8556ed18eff3b45d724dfdb6d2 (diff) |
use c versions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/arch/hppa/string/Makefile.inc | 6 | ||||
-rw-r--r-- | lib/libc/arch/hppa/string/bcmp.S | 82 | ||||
-rw-r--r-- | lib/libc/arch/hppa/string/bzero.S | 114 |
3 files changed, 3 insertions, 199 deletions
diff --git a/lib/libc/arch/hppa/string/Makefile.inc b/lib/libc/arch/hppa/string/Makefile.inc index 2feab8eb5de..199646002f9 100644 --- a/lib/libc/arch/hppa/string/Makefile.inc +++ b/lib/libc/arch/hppa/string/Makefile.inc @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile.inc,v 1.4 1999/09/14 00:46:18 mickey Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2002/02/25 17:30:28 mickey Exp $ -SRCS+= memchr.c memcmp.c memset.c index.c rindex.c \ +SRCS+= bcmp.c bzero.c memchr.c memcmp.c memset.c index.c rindex.c \ strcat.c strcmp.c strcpy.c strcspn.c strlen.c \ strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \ strspn.c strstr.c swab.c -SRCS+= bcmp.S bzero.S ffs.S strlcpy.S +SRCS+= ffs.S strlcpy.c diff --git a/lib/libc/arch/hppa/string/bcmp.S b/lib/libc/arch/hppa/string/bcmp.S deleted file mode 100644 index 487bcbdb230..00000000000 --- a/lib/libc/arch/hppa/string/bcmp.S +++ /dev/null @@ -1,82 +0,0 @@ -/* $OpenBSD: bcmp.S,v 1.3 2001/06/04 23:14:02 mickey Exp $ */ - -/* - * Copyright 1996 1995 by Open Software Foundation, Inc. - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appears in all copies and - * that both the copyright notice and this permission notice appear in - * supporting documentation. - * - * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, - * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* - * (c) Copyright 1988 HEWLETT-PACKARD COMPANY - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Hewlett-Packard Company not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Hewlett-Packard Company makes no representations about the - * suitability of this software for any purpose. - */ -/* - * Copyright (c) 1990,1991,1994 The University of Utah and - * the Computer Systems Laboratory (CSL). All rights reserved. - * - * THE UNIVERSITY OF UTAH AND CSL PROVIDE THIS SOFTWARE IN ITS "AS IS" - * CONDITION, AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES - * WHATSOEVER RESULTING FROM ITS USE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Utah Hdr: movc.s 1.26 94/12/14 - */ - -#include <machine/asm.h> - -#ifdef SYSLIBC_SCCS - .text - .asciz "$OpenBSD: bcmp.S,v 1.3 2001/06/04 23:14:02 mickey Exp $" - .align 4 -#endif - -/* - * int - * bcmp(src, dst, count) - * vm_offset_t src; - * vm_offset_t dst; - * int count; - */ -LEAF_ENTRY(bcmp) - comb,>= r0,arg2,$bcmp_exit - copy t1,t2 - -$bcmp_loop - ldbs,ma 1(arg0),t1 - ldbs,ma 1(arg1),t2 - comb,<>,n t1,t2,$bcmp_exit - addib,<> -1,arg2,$bcmp_loop - nop - -$bcmp_exit - bv 0(r2) - sub t1,t2,ret0 - -EXIT(bcmp) - diff --git a/lib/libc/arch/hppa/string/bzero.S b/lib/libc/arch/hppa/string/bzero.S deleted file mode 100644 index 5c43e65a93b..00000000000 --- a/lib/libc/arch/hppa/string/bzero.S +++ /dev/null @@ -1,114 +0,0 @@ -/* $OpenBSD: bzero.S,v 1.3 2001/06/04 23:14:02 mickey Exp $ */ - -/* - * (c) Copyright 1988 HEWLETT-PACKARD COMPANY - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Hewlett-Packard Company not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Hewlett-Packard Company makes no representations about the - * suitability of this software for any purpose. - */ -/* - * Copyright (c) 1990,1994 The University of Utah and - * the Computer Systems Laboratory (CSL). All rights reserved. - * - * THE UNIVERSITY OF UTAH AND CSL PROVIDE THIS SOFTWARE IN ITS "AS IS" - * CONDITION, AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES - * WHATSOEVER RESULTING FROM ITS USE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Utah $Hdr: bzero.s 1.9 94/12/14$ - * Author: Bob Wheeler, University of Utah CSL - */ - -#include <machine/asm.h> - -#ifdef SYSLIBC_SCCS - .text - .asciz "$OpenBSD: bzero.S,v 1.3 2001/06/04 23:14:02 mickey Exp $" - .align 4 -#endif - -/* - * void - * bzero(dst, count) - * vm_offset_t dst; - * int count; - */ -LEAF_ENTRY(bzero) - comb,>=,n r0,arg1,$bzero_exit - - /* - * If we need to clear less than a word do it a byte at a time - */ - - comib,>,n 4,arg1,$bzero_bytes - - /* - * Since we are only clearing memory the alignment restrictions - * are simplified. Figure out how many "extra" bytes we need to - * store with stbys. - */ - - extru arg0,31,2,t2 - add arg1,t2,arg1 - - /* - * We will zero the destination in blocks of 16 bytes as long as we - * can and then we'll go to the 4 byte moves. - */ - - addib,<,n -16,arg1,$bzero_word - -$bzero_loop_16 - stbys,b,m r0,4(arg0) - stwm r0,4(arg0) - stwm r0,4(arg0) - addib,>= -16,arg1,$bzero_loop_16 - stwm r0,4(arg0) - - /* - * see if there is anything left that needs to be zeroed in a word - * move. Since the count was decremented by 16, add 12 to test if - * there are any full word moves left to do. - */ - -$bzero_word - addib,<,n 12,arg1,$bzero_cleanup - -$bzero_loop_4 - addib,>= -4,arg1,$bzero_loop_4 - stbys,b,m r0,4(arg0) - - /* - * zero the last bytes that may be unaligned on a word boundary - */ - -$bzero_cleanup - addib,=,n 4,arg1,$bzero_exit - add arg0,arg1,arg0 - b $bzero_exit - stbys,e r0,0(arg0) - b,n $bzero_exit - - - /* - * zero by bytes - */ - -$bzero_bytes - addib,> -1,arg1,$bzero_bytes - stbs,ma r0,1(arg0) - -$bzero_exit -EXIT(bzero) - - .end |