diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:38:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:38:17 +0000 |
commit | 462fe1c05915e37987580d4c740391c27b280c31 (patch) | |
tree | a3de408e51dd2b180055fd3ce88a7a2929452cf2 /lib/libc/arch | |
parent | 86b4fdd623d3c50d7bfd9427c2c9208454cd0da7 (diff) |
update from netbsd
Diffstat (limited to 'lib/libc/arch')
-rw-r--r-- | lib/libc/arch/m68k/string/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/bcmp.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/bcopy.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/bzero.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/ffs.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/index.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/memcmp.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/memset.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/rindex.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/strcat.S | 61 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/strcmp.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/strcpy.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/strlen.S | 19 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/strncmp.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/strncpy.S | 14 | ||||
-rw-r--r-- | lib/libc/arch/m68k/string/swab.S | 2 |
16 files changed, 185 insertions, 69 deletions
diff --git a/lib/libc/arch/m68k/string/Makefile.inc b/lib/libc/arch/m68k/string/Makefile.inc index 8ed076485f3..e06c0d02828 100644 --- a/lib/libc/arch/m68k/string/Makefile.inc +++ b/lib/libc/arch/m68k/string/Makefile.inc @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.1 1995/03/20 14:45:45 mycroft Exp $ +# $NetBSD: Makefile.inc,v 1.2 1995/10/21 20:24:48 jtc Exp $ SRCS+= bcmp.S bcopy.S bzero.S ffs.S index.S memchr.c memcmp.S memset.S \ - rindex.S strcat.c strcmp.S strcpy.S strcspn.c strlen.S \ + rindex.S strcat.S strcmp.S strcpy.S strcspn.c strlen.S \ strncat.c strncmp.S strncpy.S strpbrk.c strsep.c \ strspn.c strstr.c swab.S SRCS+= memcpy.S memmove.S strchr.S strrchr.S diff --git a/lib/libc/arch/m68k/string/bcmp.S b/lib/libc/arch/m68k/string/bcmp.S index 2cfae67e363..d58ee470836 100644 --- a/lib/libc/arch/m68k/string/bcmp.S +++ b/lib/libc/arch/m68k/string/bcmp.S @@ -1,3 +1,5 @@ +/* $NetBSD: bcmp.S,v 1.4 1995/11/28 23:40:47 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,16 +37,18 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: bcmp.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: bcmp.S,v 1.4 1995/11/28 23:40:47 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ /* bcmp(s1, s2, n) */ -#include "DEFS.h" - /* * This is probably not the best we can do, but it is still 2-10 times * faster than the C version in the portable gen directory. diff --git a/lib/libc/arch/m68k/string/bcopy.S b/lib/libc/arch/m68k/string/bcopy.S index 137c27db218..f26682e85f5 100644 --- a/lib/libc/arch/m68k/string/bcopy.S +++ b/lib/libc/arch/m68k/string/bcopy.S @@ -1,3 +1,5 @@ +/* $NetBSD: bcopy.S,v 1.8 1995/11/28 23:40:49 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)bcopy.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: bcopy.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)bcopy.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: bcopy.S,v 1.8 1995/11/28 23:40:49 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - /* * This is probably not the best we can do, but it is still 2-10 times * faster than the C version in the portable gen directory. diff --git a/lib/libc/arch/m68k/string/bzero.S b/lib/libc/arch/m68k/string/bzero.S index c9822440bb2..816b5553a28 100644 --- a/lib/libc/arch/m68k/string/bzero.S +++ b/lib/libc/arch/m68k/string/bzero.S @@ -1,3 +1,5 @@ +/* $NetBSD: bzero.S,v 1.4 1995/11/28 23:40:50 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)bzero.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: bzero.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: bzero.S,v 1.4 1995/11/28 23:40:50 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - /* * This is probably not the best we can do, but it is still much * faster than the C version in the portable gen directory. diff --git a/lib/libc/arch/m68k/string/ffs.S b/lib/libc/arch/m68k/string/ffs.S index d35e3ffd291..273f4541440 100644 --- a/lib/libc/arch/m68k/string/ffs.S +++ b/lib/libc/arch/m68k/string/ffs.S @@ -1,3 +1,5 @@ +/* $NetBSD: ffs.S,v 1.5 1995/11/28 23:40:52 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,16 +37,18 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)ffs.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: ffs.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)ffs.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: ffs.S,v 1.5 1995/11/28 23:40:52 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ /* bit = ffs(value) */ -#include "DEFS.h" - ENTRY(ffs) movl sp@(4),d0 movl d0,d1 diff --git a/lib/libc/arch/m68k/string/index.S b/lib/libc/arch/m68k/string/index.S index 1d26bc4bc60..d40ab74e351 100644 --- a/lib/libc/arch/m68k/string/index.S +++ b/lib/libc/arch/m68k/string/index.S @@ -1,3 +1,5 @@ +/* $NetBSD: index.S,v 1.5 1995/11/28 23:40:53 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)index.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: index.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)index.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: index.S,v 1.5 1995/11/28 23:40:53 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - #ifdef STRCHR ENTRY(strchr) #else diff --git a/lib/libc/arch/m68k/string/memcmp.S b/lib/libc/arch/m68k/string/memcmp.S index 578c23308ba..9799eb8604e 100644 --- a/lib/libc/arch/m68k/string/memcmp.S +++ b/lib/libc/arch/m68k/string/memcmp.S @@ -1,3 +1,5 @@ +/* $NetBSD: memcmp.S,v 1.7 1995/11/28 23:40:55 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,16 +37,18 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: memcmp.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)bcmp.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: memcmp.S,v 1.7 1995/11/28 23:40:55 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ /* memcmp(s1, s2, n) */ -#include "DEFS.h" - /* * This is probably not the best we can do, but it is still 2-10 times * faster than the C version in the portable gen directory. diff --git a/lib/libc/arch/m68k/string/memset.S b/lib/libc/arch/m68k/string/memset.S index 322abc10582..78d484ed9b3 100644 --- a/lib/libc/arch/m68k/string/memset.S +++ b/lib/libc/arch/m68k/string/memset.S @@ -1,3 +1,5 @@ +/* $NetBSD: memset.S,v 1.6 1995/11/28 23:40:56 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)bzero.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: memset.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)bzero.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: memset.S,v 1.6 1995/11/28 23:40:56 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - /* * This is probably not the best we can do, but it is still much * faster than the C version in the portable gen directory. diff --git a/lib/libc/arch/m68k/string/rindex.S b/lib/libc/arch/m68k/string/rindex.S index 211654d34f6..1e6fa839bb6 100644 --- a/lib/libc/arch/m68k/string/rindex.S +++ b/lib/libc/arch/m68k/string/rindex.S @@ -1,3 +1,5 @@ +/* $NetBSD: rindex.S,v 1.5 1995/11/28 23:40:57 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)rindex.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: rindex.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)rindex.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: rindex.S,v 1.5 1995/11/28 23:40:57 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - #ifdef STRRCHR ENTRY(strrchr) #else diff --git a/lib/libc/arch/m68k/string/strcat.S b/lib/libc/arch/m68k/string/strcat.S new file mode 100644 index 00000000000..10af7391c1a --- /dev/null +++ b/lib/libc/arch/m68k/string/strcat.S @@ -0,0 +1,61 @@ +/* $NetBSD: strcat.S,v 1.4 1995/11/28 23:40:59 thorpej Exp $ */ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "DEFS.h" + +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 + RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: strcat.S,v 1.4 1995/11/28 23:40:59 thorpej Exp $") +#endif +#endif /* LIBC_SCCS and not lint */ + +ENTRY(strcat) + movl sp@(8),a0 | a0 = fromaddr + movl sp@(4),d0 | return value is toaddr + movl d0,a1 | a1 = toaddr +slloop: + tstb a1@+ | null? + bne slloop | no, keep going + subql #1,a1 +scloop: + movb a0@+,a1@+ | copy a byte + bne scloop | copied non-null, keep going + rts diff --git a/lib/libc/arch/m68k/string/strcmp.S b/lib/libc/arch/m68k/string/strcmp.S index 92dfd30c57b..71f27188332 100644 --- a/lib/libc/arch/m68k/string/strcmp.S +++ b/lib/libc/arch/m68k/string/strcmp.S @@ -1,3 +1,5 @@ +/* $NetBSD: strcmp.S,v 1.5 1995/11/28 23:41:00 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)strcmp.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: strcmp.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)strcmp.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: strcmp.S,v 1.5 1995/11/28 23:41:00 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - /* * NOTE: this guy returns result compatible with the VAX assembly version. * The C version on the portable gen directory returns different results diff --git a/lib/libc/arch/m68k/string/strcpy.S b/lib/libc/arch/m68k/string/strcpy.S index de1be32b574..3652625340c 100644 --- a/lib/libc/arch/m68k/string/strcpy.S +++ b/lib/libc/arch/m68k/string/strcpy.S @@ -1,3 +1,5 @@ +/* $NetBSD: strcpy.S,v 1.4 1995/11/28 23:41:01 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: strcpy.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)strcpy.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: strcpy.S,v 1.4 1995/11/28 23:41:01 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - ENTRY(strcpy) movl sp@(8),a0 | a0 = fromaddr movl sp@(4),d0 | return value is toaddr diff --git a/lib/libc/arch/m68k/string/strlen.S b/lib/libc/arch/m68k/string/strlen.S index 65c94469f92..7302c8768ae 100644 --- a/lib/libc/arch/m68k/string/strlen.S +++ b/lib/libc/arch/m68k/string/strlen.S @@ -1,3 +1,5 @@ +/* $NetBSD: strlen.S,v 1.5 1995/11/28 23:41:03 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,19 +37,22 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)strlen.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: strlen.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)strlen.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: strlen.S,v 1.5 1995/11/28 23:41:03 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - ENTRY(strlen) - moveq #-1,d0 movl sp@(4),a0 | string + movl a0,d0 + notl d0 slloop: - addql #1,d0 | increment count tstb a0@+ | null? bne slloop | no, keep going + addl a0,d0 rts diff --git a/lib/libc/arch/m68k/string/strncmp.S b/lib/libc/arch/m68k/string/strncmp.S index 7d06a8de187..e53367f7d15 100644 --- a/lib/libc/arch/m68k/string/strncmp.S +++ b/lib/libc/arch/m68k/string/strncmp.S @@ -1,3 +1,5 @@ +/* $NetBSD: strncmp.S,v 1.4 1995/11/28 23:41:04 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)strncmp.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: strncmp.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)strncmp.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: strncmp.S,v 1.4 1995/11/28 23:41:04 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - /* * NOTE: this guy returns result compatible with the VAX assembly version. * The C version on the portable gen directory returns different results diff --git a/lib/libc/arch/m68k/string/strncpy.S b/lib/libc/arch/m68k/string/strncpy.S index 310614c3ac9..be708e185d7 100644 --- a/lib/libc/arch/m68k/string/strncpy.S +++ b/lib/libc/arch/m68k/string/strncpy.S @@ -1,3 +1,5 @@ +/* $NetBSD: strncpy.S,v 1.4 1995/11/28 23:41:05 thorpej Exp $ */ + /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -35,14 +37,16 @@ * SUCH DAMAGE. */ +#include "DEFS.h" + #if defined(LIBC_SCCS) && !defined(lint) - .text - /*.asciz "from: @(#)strncpy.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: strncpy.S,v 1.1 1995/10/18 08:41:31 deraadt Exp $" +#if 0 + RCSID("from: @(#)strncpy.s 5.1 (Berkeley) 5/12/90") +#else + RCSID("$NetBSD: strncpy.S,v 1.4 1995/11/28 23:41:05 thorpej Exp $") +#endif #endif /* LIBC_SCCS and not lint */ -#include "DEFS.h" - ENTRY(strncpy) movl sp@(4),d0 | return value is toaddr movl sp@(12),d1 | count diff --git a/lib/libc/arch/m68k/string/swab.S b/lib/libc/arch/m68k/string/swab.S index 80d5d120535..5e430326d8d 100644 --- a/lib/libc/arch/m68k/string/swab.S +++ b/lib/libc/arch/m68k/string/swab.S @@ -1,3 +1,5 @@ +/* $NetBSD: swab.S,v 1.4 1995/11/17 20:21:28 thorpej Exp $ */ + #include "DEFS.h" ENTRY(swab) |