summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 22:24:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-04 22:24:35 +0000
commitb8c331f7179f90ceaf61c18a89a37a06a53d69e9 (patch)
treecde04e4a296b0f235e8a1231f89db5e3723c6e92
parentde078e75292fc6026b52794eb00c6a4df437385f (diff)
more locc() dies
-rw-r--r--sys/lib/libkern/arch/i386/Makefile.inc4
-rw-r--r--sys/lib/libkern/arch/i386/locc.S48
-rw-r--r--sys/lib/libkern/arch/m68k/Makefile.inc4
-rw-r--r--sys/lib/libkern/arch/m68k/locc.S58
-rw-r--r--sys/lib/libkern/arch/powerpc/Makefile.inc4
5 files changed, 6 insertions, 112 deletions
diff --git a/sys/lib/libkern/arch/i386/Makefile.inc b/sys/lib/libkern/arch/i386/Makefile.inc
index eacb3cc5bbb..6b8a7fc41b8 100644
--- a/sys/lib/libkern/arch/i386/Makefile.inc
+++ b/sys/lib/libkern/arch/i386/Makefile.inc
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile.inc,v 1.8 2003/06/01 17:00:30 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2007/05/04 22:24:34 deraadt Exp $
# $NetBSD: Makefile.inc,v 1.10 1996/04/13 01:17:41 cgd Exp $
SRCS+= __main.c imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \
memchr.S memcmp.S \
bcmp.S ffs.S memset.S strcmp.S strlcat.c strlcpy.c \
strlen.S strncmp.c \
- strncpy.c scanc.S skpc.S locc.S htonl.S htons.S ntohl.S ntohs.S \
+ strncpy.c scanc.S skpc.S htonl.S htons.S ntohl.S ntohs.S \
strncasecmp.c
diff --git a/sys/lib/libkern/arch/i386/locc.S b/sys/lib/libkern/arch/i386/locc.S
deleted file mode 100644
index 141f62c85de..00000000000
--- a/sys/lib/libkern/arch/i386/locc.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $OpenBSD: locc.S,v 1.2 1996/09/27 06:47:46 mickey Exp $ */
-/* $NetBSD: locc.S,v 1.2 1994/10/26 06:39:10 cgd Exp $ */
-
-/*
- * Copyright (c) 1994 Charles Hannum. All rights reserved.
- *
- * 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 Charles Hannum.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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"
-
-ENTRY(locc)
- pushl %edi
- movl 16(%esp),%edi
- movl 12(%esp),%ecx
- movl 8(%esp),%eax
- cld
- repne
- scasb
- jne 1f
- incl %ecx
-1:
- movl %ecx,%eax
- popl %edi
- ret
diff --git a/sys/lib/libkern/arch/m68k/Makefile.inc b/sys/lib/libkern/arch/m68k/Makefile.inc
index fe75454e089..9b52295e01e 100644
--- a/sys/lib/libkern/arch/m68k/Makefile.inc
+++ b/sys/lib/libkern/arch/m68k/Makefile.inc
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile.inc,v 1.9 2006/01/04 22:32:46 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.10 2007/05/04 22:24:34 deraadt Exp $
# $NetBSD: Makefile.inc,v 1.7 1996/04/18 01:53:04 cgd Exp $
SRCS+= __main.c imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \
memchr.c memcmp.S memset.S random.c \
bcmp.S bzero.S ffs.S strcmp.S strlcat.c strlcpy.c \
strlen.S strncmp.S \
- strncpy.S htonl.S htons.S ntohl.S ntohs.S scanc.S skpc.S locc.S \
+ strncpy.S htonl.S htons.S ntohl.S ntohs.S scanc.S skpc.S \
strncasecmp.c
diff --git a/sys/lib/libkern/arch/m68k/locc.S b/sys/lib/libkern/arch/m68k/locc.S
deleted file mode 100644
index 49cdc375aa5..00000000000
--- a/sys/lib/libkern/arch/m68k/locc.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $OpenBSD: locc.S,v 1.3 2003/06/02 23:28:08 millert Exp $ */
-/* $NetBSD: locc.S,v 1.2 1994/10/26 06:39:28 cgd Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1980, 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. 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.
- *
- * from: Utah Hdr: locore.s 1.58 91/04/22
- * @(#)locore.s 7.11 (Berkeley) 5/9/91
- */
-
-#include "DEFS.h"
-
-/*
- * Emulate fancy VAX string operations:
- * locc(mask, count, startc)
- */
-ENTRY(locc)
- movl sp@(8),d0 | get length
- jeq Llcdone | nothing to do, return
- movb sp@(7),d1 | mask to use
- movl sp@(12),a0 | where to start
- subqw #1,d0 | adjust for dbcc
-Llcloop:
- cmpb a0@+,d1 | compate with mask
- dbeq d0,Llcloop | keep going til no more or non-zero
- addqw #1,d0 | overshot by one
-Llcdone:
- rts
diff --git a/sys/lib/libkern/arch/powerpc/Makefile.inc b/sys/lib/libkern/arch/powerpc/Makefile.inc
index 13c8f95fffd..bfb028f3e51 100644
--- a/sys/lib/libkern/arch/powerpc/Makefile.inc
+++ b/sys/lib/libkern/arch/powerpc/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.12 2005/07/20 23:06:44 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.13 2007/05/04 22:24:34 deraadt Exp $
# $NetBSD: Makefile.inc,v 1.6 1994/10/26 06:39:03 cgd Exp $
CFLAGS += -D_KERNEL
@@ -8,7 +8,7 @@ SRCS+= __main.c __eabi.c \
memchr.c memcmp.c memset.c \
bcmp.c ffs.c strcmp.c strlcat.c strlcpy.c \
strlen.c strncmp.c \
- strncpy.c scanc.c skpc.c locc.c \
+ strncpy.c scanc.c skpc.c \
memcpy.c random.c strncasecmp.c
OBJS+= bzero.o