summaryrefslogtreecommitdiff
path: root/sys/lib/libkern
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-03-18 22:36:38 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-03-18 22:36:38 +0000
commit954b1a417ec63f20d2dde0645d24641005375a40 (patch)
tree4d3b982016a572dbb41f88eb76f38a29039036bb /sys/lib/libkern
parent7e9918e631c8d89e4daeae75c43b6381c34a8610 (diff)
Retire hp300, mvme68k and mvme88k ports. These ports have no users, keeping
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
Diffstat (limited to 'sys/lib/libkern')
-rw-r--r--sys/lib/libkern/arch/m68k/DEFS.h4
-rw-r--r--sys/lib/libkern/arch/m68k/SYS.h76
-rw-r--r--sys/lib/libkern/arch/m68k/bcmp.S83
-rw-r--r--sys/lib/libkern/arch/m68k/bcopy.S1
-rw-r--r--sys/lib/libkern/arch/m68k/bzero.S72
-rw-r--r--sys/lib/libkern/arch/m68k/ffs.S48
-rw-r--r--sys/lib/libkern/arch/m68k/htonl.S45
-rw-r--r--sys/lib/libkern/arch/m68k/htons.S46
-rw-r--r--sys/lib/libkern/arch/m68k/memcmp.S92
-rw-r--r--sys/lib/libkern/arch/m68k/memcpy.S1
-rw-r--r--sys/lib/libkern/arch/m68k/memmove.S132
-rw-r--r--sys/lib/libkern/arch/m68k/memset.S103
-rw-r--r--sys/lib/libkern/arch/m68k/scanc.S64
-rw-r--r--sys/lib/libkern/arch/m68k/skpc.S58
-rw-r--r--sys/lib/libkern/arch/m68k/strcmp.S58
-rw-r--r--sys/lib/libkern/arch/m68k/strlen.S45
-rw-r--r--sys/lib/libkern/arch/m68k/strncmp.S63
-rw-r--r--sys/lib/libkern/arch/m68k/strncpy.S55
18 files changed, 0 insertions, 1046 deletions
diff --git a/sys/lib/libkern/arch/m68k/DEFS.h b/sys/lib/libkern/arch/m68k/DEFS.h
deleted file mode 100644
index 5665586dff1..00000000000
--- a/sys/lib/libkern/arch/m68k/DEFS.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $OpenBSD: DEFS.h,v 1.2 1997/11/07 15:57:00 niklas Exp $ */
-/* $NetBSD: DEFS.h,v 1.2 1994/10/26 06:39:21 cgd Exp $ */
-
-#include <machine/asm.h>
diff --git a/sys/lib/libkern/arch/m68k/SYS.h b/sys/lib/libkern/arch/m68k/SYS.h
deleted file mode 100644
index 53dcaa91d90..00000000000
--- a/sys/lib/libkern/arch/m68k/SYS.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* $OpenBSD: SYS.h,v 1.3 2003/06/02 23:28:08 millert Exp $ */
-/* $NetBSD: SYS.h,v 1.2 1994/10/26 06:39:23 cgd 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. 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.
- *
- * @(#)SYS.h 5.5 (Berkeley) 5/7/91
- */
-
-#include <sys/syscall.h>
-#include <machine/asm.h>
-
-#ifdef __STDC__
-
-#ifdef PIC
-/* With PIC code, we can't pass the error to cerror in d0,
- because the jump might go via the binder. */
-#define SYSCALL(x) .even; err: movl d0,sp@-; jra cerror; ENTRY(x); \
- movl \#SYS_ ## x,d0; trap \#0; jcs err
-#else /* !PIC */
-#define SYSCALL(x) .even; err: jra cerror; ENTRY(x); \
- movl \#SYS_ ## x,d0; trap \#0; jcs err
-#endif /* !PIC */
-
-#define RSYSCALL(x) SYSCALL(x); rts
-#define PSEUDO(x,y) ENTRY(x); movl \#SYS_ ## y,d0; trap \#0; rts
-
-#else /* !__STDC__ */
-
-#ifdef PIC
-/* With PIC code, we can't pass the error to cerror in d0,
- because the jump might go via the binder. */
-#define SYSCALL(x) .even; err: movl d0,sp@-; jra cerror; ENTRY(x); \
- movl #SYS_/**/x,d0; trap #0; jcs err
-#else /* !PIC */
-#define SYSCALL(x) .even; err: jra cerror; ENTRY(x); \
- movl #SYS_/**/x,d0; trap #0; jcs err
-#endif /* !PIC */
-
-#define RSYSCALL(x) SYSCALL(x); rts
-#define PSEUDO(x,y) ENTRY(x); movl #SYS_/**/y,d0; trap #0; rts
-
-#endif /* !__STDC__ */
-
-#define ASMSTR .asciz
-
- .globl cerror
diff --git a/sys/lib/libkern/arch/m68k/bcmp.S b/sys/lib/libkern/arch/m68k/bcmp.S
deleted file mode 100644
index 4c2f2b4ebb1..00000000000
--- a/sys/lib/libkern/arch/m68k/bcmp.S
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $OpenBSD: bcmp.S,v 1.5 2013/02/02 13:32:06 miod 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. 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.
- */
-
-/* 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.
- *
- * Things that might help:
- * - longword align when possible (only on the 68020)
- * - use nested DBcc instructions or use one and limit size to 64K
- */
-ENTRY(bcmp)
- movl %sp@(4),%a0 | string 1
- movl %sp@(8),%a1 | string 2
- movl %sp@(12),%d0 | length
- beq bcdone | if zero, nothing to do
- movl %a0,%d1
- btst #0,%d1 | string 1 address odd?
- beq bceven | no, skip alignment
- cmpmb %a0@+,%a1@+ | yes, compare a byte
- bne bcnoteq | not equal, return non-zero
- subql #1,%d0 | adjust count
- beq bcdone | count 0, reutrn zero
-bceven:
- movl %a1,%d1
- btst #0,%d1 | string 2 address odd?
- bne bcbloop | yes, no hope for alignment, compare bytes
- movl %d0,%d1 | no, both even
- lsrl #2,%d1 | convert count to longword count
- beq bcbloop | count 0, skip longword loop
-bclloop:
- cmpml %a0@+,%a1@+ | compare a longword
- bne bcnoteq | not equal, return non-zero
- subql #1,%d1 | adjust count
- bne bclloop | still more, keep comparing
- andl #3,%d0 | what remains
- beq bcdone | nothing, all done
-bcbloop:
- cmpmb %a0@+,%a1@+ | compare a byte
- bne bcnoteq | not equal, return non-zero
- subql #1,%d0 | adjust count
- bne bcbloop | still more, keep going
- rts
-bcnoteq:
- moveq #1,%d0
-bcdone:
- rts
diff --git a/sys/lib/libkern/arch/m68k/bcopy.S b/sys/lib/libkern/arch/m68k/bcopy.S
deleted file mode 100644
index 38afdda4544..00000000000
--- a/sys/lib/libkern/arch/m68k/bcopy.S
+++ /dev/null
@@ -1 +0,0 @@
-/* Implemented in memmove.S */
diff --git a/sys/lib/libkern/arch/m68k/bzero.S b/sys/lib/libkern/arch/m68k/bzero.S
deleted file mode 100644
index b61d55ff2a1..00000000000
--- a/sys/lib/libkern/arch/m68k/bzero.S
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $OpenBSD: bzero.S,v 1.5 2013/02/02 13:32:06 miod 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. 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"
-
-/*
- * This is probably not the best we can do, but it is still much
- * faster than the C version in the portable gen directory.
- *
- * Things that might help:
- * - unroll the longword loop (might not be good for a 68020)
- * - longword, as opposed to word, align when possible (only on the 68020)
- * - use nested DBcc instructions or use one and limit size to 64K
- */
-ENTRY(bzero)
- movl %sp@(4),%a0 | destination
- movl %sp@(8),%d0 | count
- beq bzdone | nothing to do
- movl %a0,%d1
- btst #0,%d1 | address odd?
- beq bzeven | no, skip alignment
- clrb %a0@+ | yes, clear a byte
- subql #1,%d0 | adjust count
- beq bzdone | if zero, all done
-bzeven:
- movl %d0,%d1
- lsrl #2,%d1 | convert to longword count
- beq bzbloop | no longwords, skip loop
-bzlloop:
- clrl %a0@+ | clear a longword
- subql #1,%d1 | adjust count
- bne bzlloop | still more, keep going
- andl #3,%d0 | what remains
- beq bzdone | nothing, all done
-bzbloop:
- clrb %a0@+ | clear a byte
- subql #1,%d0 | adjust count
- bne bzbloop | still more, keep going
-bzdone:
- rts
diff --git a/sys/lib/libkern/arch/m68k/ffs.S b/sys/lib/libkern/arch/m68k/ffs.S
deleted file mode 100644
index cca620e30f9..00000000000
--- a/sys/lib/libkern/arch/m68k/ffs.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $OpenBSD: ffs.S,v 1.5 2013/02/02 13:32:06 miod 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. 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.
- */
-
-/* bit = ffs(value) */
-
-#include "DEFS.h"
-
-ENTRY(ffs)
- movl %sp@(4),%d0
- movl %d0,%d1
- negl %d0
- andl %d0,%d1
- movql #32,%d0
- bfffo %d1{#0:#32},%d1
- subl %d1,%d0
- rts
diff --git a/sys/lib/libkern/arch/m68k/htonl.S b/sys/lib/libkern/arch/m68k/htonl.S
deleted file mode 100644
index d13088cd286..00000000000
--- a/sys/lib/libkern/arch/m68k/htonl.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $OpenBSD: htonl.S,v 1.5 2013/02/02 13:32:06 miod Exp $ */
-/* $NetBSD: htonl.S,v 1.2 1994/10/26 06:39:27 cgd 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. 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.
- */
-
-/* netorder = htonl(hostorder) */
-
-#include "DEFS.h"
-
-ALTENTRY(ntohl, _htonl)
-ALTENTRY(bswap32, _htonl)
-ENTRY(htonl)
- movl %sp@(4),%d0
- rts
diff --git a/sys/lib/libkern/arch/m68k/htons.S b/sys/lib/libkern/arch/m68k/htons.S
deleted file mode 100644
index 6fd535f8e74..00000000000
--- a/sys/lib/libkern/arch/m68k/htons.S
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $OpenBSD: htons.S,v 1.5 2013/02/02 13:32:06 miod Exp $ */
-/* $NetBSD: htons.S,v 1.2 1994/10/26 06:39:27 cgd 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. 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.
- */
-
-/* hostorder = htons(netorder) */
-
-#include "DEFS.h"
-
-ALTENTRY(ntohs, _htons)
-ALTENTRY(bswap16, _htons)
-ENTRY(htons)
- clrl %d0
- movw %sp@(6),%d0
- rts
diff --git a/sys/lib/libkern/arch/m68k/memcmp.S b/sys/lib/libkern/arch/m68k/memcmp.S
deleted file mode 100644
index e9d032cc426..00000000000
--- a/sys/lib/libkern/arch/m68k/memcmp.S
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $OpenBSD: memcmp.S,v 1.4 2013/02/02 13:32:06 miod 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. 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"
-
-/* memcmp(s1, s2, n) */
-
-/*
- * 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.
- *
- * Things that might help:
- * - longword align when possible (only on the 68020)
- * - use nested DBcc instructions or use one and limit size to 64K
- */
-ENTRY(memcmp)
- movl %sp@(4),%a0 | string 1
- movl %sp@(8),%a1 | string 2
- movl %sp@(12),%d0 | length
- beq bcdone | if zero, nothing to do
- movl %a0,%d1
- btst #0,%d1 | string 1 address odd?
- beq bceven | no, skip alignment
- cmpmb %a0@+,%a1@+ | yes, compare a byte
- bne bcnoteq | not equal, return non-zero
- subql #1,%d0 | adjust count
- beq bcdone | count 0, reutrn zero
-bceven:
- movl %a1,%d1
- btst #0,%d1 | string 2 address odd?
- bne bcbloop | yes, no hope for alignment, compare bytes
- movl %d0,%d1 | no, both even
- lsrl #2,%d1 | convert count to longword count
- beq bcbloop | count 0, skip longword loop
-bclloop:
- cmpml %a0@+,%a1@+ | compare a longword
- bne bcnoteql | not equal, return non-zero
- subql #1,%d1 | adjust count
- bne bclloop | still more, keep comparing
- andl #3,%d0 | what remains
- beq bcdone | nothing, all done
-bcbloop:
- cmpmb %a0@+,%a1@+ | compare a byte
- bne bcnoteq | not equal, return non-zero
- subql #1,%d0 | adjust count
- bne bcbloop | still more, keep going
- rts
-bcnoteql:
- subql #4,%a0
- subql #4,%a1
- movl #4,%d0
- jra bcbloop
-bcnoteq:
- clrl %d0
- clrl %d1
- movb %a0@-,%d0
- movb %a1@-,%d1
- subl %d1,%d0
-bcdone:
- rts
diff --git a/sys/lib/libkern/arch/m68k/memcpy.S b/sys/lib/libkern/arch/m68k/memcpy.S
deleted file mode 100644
index 38afdda4544..00000000000
--- a/sys/lib/libkern/arch/m68k/memcpy.S
+++ /dev/null
@@ -1 +0,0 @@
-/* Implemented in memmove.S */
diff --git a/sys/lib/libkern/arch/m68k/memmove.S b/sys/lib/libkern/arch/m68k/memmove.S
deleted file mode 100644
index a6992690957..00000000000
--- a/sys/lib/libkern/arch/m68k/memmove.S
+++ /dev/null
@@ -1,132 +0,0 @@
-/* $OpenBSD: memmove.S,v 1.4 2013/06/17 17:50:07 jj Exp $ */
-/* $NetBSD: bcopy.s,v 1.1 1997/03/17 19:44:33 gwr 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. 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.
- */
-
-/*
- * This is based on: src/lib/libc/arch/m68k/string/bcopy.S
- * identified as: @(#)bcopy.s 5.1 (Berkeley) 5/12/90
- */
-
-#include <machine/asm.h>
-
- .file "memmove.S"
- .text
-
-/*
- * bcopy(from, to, len)
- * memmove(to, from, len): swap args and fall into bcopy
- * memcpy(to, from, len): swap args, and fall into forward bcopy
- *
- */
-ENTRY(memcpy)
- movl %sp@(12),%d0 | get count
- jeq Lbccpyexit | if zero, return
- movl %sp@(8), %a0 | src address
- movl %sp@(4), %a1 | dest address
- jra Lbcdocopyf | copy forward
-ENTRY(memmove)
- movl %sp@(12),%d0 | get count
- jeq Lbccpyexit | if zero, return
- movl %sp@(8), %a0 | src address
- movl %sp@(4), %a1 | dest address
- jra Lbcdocopy | jump into bcopy
-ENTRY(bcopy)
- movl %sp@(12),%d0 | get count
- jeq Lbccpyexit | if zero, return
- movl %sp@(4),%a0 | src address
- movl %sp@(8),%a1 | dest address
-Lbcdocopy:
- cmpl %a1,%a0 | src before dest?
- jlt Lbccpyback | yes, copy backwards (avoids overlap)
-Lbcdocopyf:
- movl %a0,%d1
- btst #0,%d1 | src address odd?
- jeq Lbccfeven | no, go check dest
- movb %a0@+,%a1@+ | yes, copy a byte
- subql #1,%d0 | update count
- jeq Lbccpyexit | exit if done
-Lbccfeven:
- movl %a1,%d1
- btst #0,%d1 | dest address odd?
- jne Lbccfbyte | yes, must copy by bytes
- movl %d0,%d1 | no, get count
- lsrl #2,%d1 | convert to longwords
- jeq Lbccfbyte | no longwords, copy bytes
-Lbccflloop:
- movl %a0@+,%a1@+ | copy longwords
- subql #1,%d1 | decrement counter
- jne Lbccflloop | til done
- andl #3,%d0 | get remaining count
- jeq Lbccpyexit | done if none
-Lbccfbyte:
-Lbccfbloop:
- movb %a0@+,%a1@+ | copy bytes
- subql #1,%d0 | decrement counter
- jne Lbccfbloop | til done
-Lbccpyexit:
- movl %sp@(4),%d0 | dest address
- moveal %d0,%a0
- rts
-Lbccpyback:
- addl %d0,%a0 | add count to src
- addl %d0,%a1 | add count to dest
- movl %a0,%d1
- btst #0,%d1 | src address odd?
- jeq Lbccbeven | no, go check dest
- movb %a0@-,%a1@- | yes, copy a byte
- subql #1,%d0 | update count
- jeq Lbccpyexit | exit if done
-Lbccbeven:
- movl %a1,%d1
- btst #0,%d1 | dest address odd?
- jne Lbccbbyte | yes, must copy by bytes
- movl %d0,%d1 | no, get count
- lsrl #2,%d1 | convert to longwords
- jeq Lbccbbyte | no longwords, copy bytes
-Lbccblloop:
- movl %a0@-,%a1@- | copy longwords
- subql #1,%d1 | decrement counter
- jne Lbccblloop | til done
- andl #3,%d0 | get remaining count
- jeq Lbccpyexit | done if none
-Lbccbbyte:
-Lbccbbloop:
- movb %a0@-,%a1@- | copy bytes
- subql #1,%d0 | decrement counter
- jne Lbccbbloop | til done
- movl %sp@(4),%d0 | dest address
- moveal %d0,%a0
- rts
-
diff --git a/sys/lib/libkern/arch/m68k/memset.S b/sys/lib/libkern/arch/m68k/memset.S
deleted file mode 100644
index 75b4b38d352..00000000000
--- a/sys/lib/libkern/arch/m68k/memset.S
+++ /dev/null
@@ -1,103 +0,0 @@
-/* $OpenBSD: memset.S,v 1.4 2013/02/02 13:32:06 miod 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. 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"
-
-/*
- * This is probably not the best we can do, but it is still much
- * faster than the C version in the portable gen directory.
- *
- * Things that might help:
- * - unroll the longword loop (might not be good for a 68020)
- * - longword, as opposed to word, align when possible (only on the 68020)
- * - use nested DBcc instructions or use one and limit size to 64K
- */
-ENTRY(memset)
- movl %d2,%sp@-
- movl %sp@(8),%a0 | destination
- movl %sp@(16),%d0 | count
- beq bzdone | nothing to do
- movb %sp@(15),%d2 | character
- movl %a0,%d1
- btst #0,%d1 | address odd?
- beq bzeven | no, skip alignment
- movb %d2,%a0@+ | set one byte
- subql #1,%d0 | adjust count
- beq bzdone | if zero, all done
-bzeven:
- cmpl #15,%d0
- ble bzbloop | too small to be worthwhile
- clrl %d1 | replicate byte to fill longword
- movb %d2,%d1
- movl %d1,%d2
- lsll #8,%d1
- orl %d1,%d2
- lsll #8,%d1
- orl %d1,%d2
- lsll #8,%d1
- orl %d1,%d2
- movl %d0,%d1 | convert to longword count
- lsrl #2,%d1
-#ifdef DEBUG
- moveml #0xffff,%sp@-
- movl %d2,%sp@-
- movl %d1,%sp@-
- movl %d0,%sp@-
- movl %a0,%sp@-
- movl #foo,%sp@-
- jsr _C_LABEL(printf)
- addl #20,%sp
- moveml %sp@+,#0xffff
-#endif
-bzlloop:
- movl %d2,%a0@+ | set one longword
- subql #1,%d1 | adjust count
- bne bzlloop | still more, keep going
- andl #3,%d0 | what remains
- beq bzdone | nothing, all done
-bzbloop:
- movb %d2,%a0@+ | set one byte
- subql #1,%d0 | adjust count
- bne bzbloop | still more, keep going
-bzdone:
- movl %sp@(8),%d0 | return destination
- movl %sp@+,%d2
- rts
-
-#ifdef DEBUG
- .globl _printf
-foo:
- .asciz "a0=%08x d0=%08x d1=%08x d2=%08x\n"
-#endif
diff --git a/sys/lib/libkern/arch/m68k/scanc.S b/sys/lib/libkern/arch/m68k/scanc.S
deleted file mode 100644
index 7f3dfeeb713..00000000000
--- a/sys/lib/libkern/arch/m68k/scanc.S
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $OpenBSD: scanc.S,v 1.4 2013/02/02 13:32:06 miod Exp $ */
-/* $NetBSD: scanc.S,v 1.2 1994/10/26 06:39:31 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:
- * scanc(count, startc, table, mask)
- */
-ENTRY(scanc)
- movl %sp@(4),%d0 | get length
- jeq Lscdone | nothing to do, return
- movl %sp@(8),%a0 | start of scan
- movl %sp@(12),%a1 | table to compare with
- movb %sp@(19),%d1 | and mask to use
- movw %d2,%sp@- | need a scratch register
- clrw %d2 | clear it out
- subqw #1,%d0 | adjust for dbra
-Lscloop:
- movb %a0@+,%d2 | get character
- movb %a1@(0,%d2:w),%d2 | get table entry
- andb %d1,%d2 | mask it
- dbne %d0,Lscloop | keep going til no more or non-zero
- addqw #1,%d0 | overshot by one
- movw %sp@+,%d2 | restore scratch
-Lscdone:
- rts
diff --git a/sys/lib/libkern/arch/m68k/skpc.S b/sys/lib/libkern/arch/m68k/skpc.S
deleted file mode 100644
index f932807b473..00000000000
--- a/sys/lib/libkern/arch/m68k/skpc.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $OpenBSD: skpc.S,v 1.4 2013/02/02 13:32:06 miod Exp $ */
-/* $NetBSD: skpc.S,v 1.2 1994/10/26 06:39:32 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:
- * skpc(mask, count, startc)
- */
-ENTRY(skpc)
- movl %sp@(8),%d0 | get length
- jeq Lskdone | nothing to do, return
- movb %sp@(7),%d1 | mask to use
- movl %sp@(12),%a0 | where to start
- subqw #1,%d0 | adjust for dbcc
-Lskloop:
- cmpb %a0@+,%d1 | compare with mask
- dbne %d0,Lskloop | keep going til no more or zero
- addqw #1,%d0 | overshot by one
-Lskdone:
- rts
diff --git a/sys/lib/libkern/arch/m68k/strcmp.S b/sys/lib/libkern/arch/m68k/strcmp.S
deleted file mode 100644
index 758470f448f..00000000000
--- a/sys/lib/libkern/arch/m68k/strcmp.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $OpenBSD: strcmp.S,v 1.5 2013/02/02 13:32:06 miod 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. 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"
-
-/*
- * NOTE: this guy returns result compatible with the VAX assembly version.
- * The C version on the portable gen directory returns different results
- * (different signs!) when comparing chars with the high bit on. Who is
- * right??
- */
-ENTRY(strcmp)
- movl %sp@(4),%a0 | a0 = string1
- movl %sp@(8),%a1 | a1 = string2
-scloop:
- movb %a0@+,%d0 | get *string1
- cmpb %a1@+,%d0 | compare a byte
- bne scexit | not equal, break out
- tstb %d0 | at end of string1?
- bne scloop | no, keep going
- moveq #0,%d0 | strings are equal
- rts
-scexit:
- subb %a1@-,%d0 | *string1 - *string2
- extbl %d0
- rts
diff --git a/sys/lib/libkern/arch/m68k/strlen.S b/sys/lib/libkern/arch/m68k/strlen.S
deleted file mode 100644
index 7afc6449ca1..00000000000
--- a/sys/lib/libkern/arch/m68k/strlen.S
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-/*-
- * 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. 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"
-
-ENTRY(strlen)
- moveq #-1,%d0
- movl %sp@(4),%a0 | string
-slloop:
- addql #1,%d0 | increment count
- tstb %a0@+ | null?
- bne slloop | no, keep going
- rts
diff --git a/sys/lib/libkern/arch/m68k/strncmp.S b/sys/lib/libkern/arch/m68k/strncmp.S
deleted file mode 100644
index ee7727a7916..00000000000
--- a/sys/lib/libkern/arch/m68k/strncmp.S
+++ /dev/null
@@ -1,63 +0,0 @@
-/* $OpenBSD: strncmp.S,v 1.5 2013/02/02 13:32:06 miod 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. 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"
-
-/*
- * NOTE: this guy returns result compatible with the VAX assembly version.
- * The C version on the portable gen directory returns different results
- * (different signs!) when comparing chars with the high bit on. Who is
- * right??
- */
-ENTRY(strncmp)
- movl %sp@(12),%d1 | count
- beq scdone | nothing to do
- movl %sp@(4),%a0 | a0 = string1
- movl %sp@(8),%a1 | a1 = string2
-scloop:
- movb %a0@+,%d0 | get *string1
- cmpb %a1@+,%d0 | compare a byte
- bne scexit | not equal, break out
- tstb %d0 | at end of string1?
- beq scdone | yes, all done
- subql #1,%d1 | no, adjust count
- bne scloop | more to do, keep going
-scdone:
- moveq #0,%d0 | strings are equal
- rts
-scexit:
- subb %a1@-,%d0 | *string1 - *string2
- extbl %d0
- rts
diff --git a/sys/lib/libkern/arch/m68k/strncpy.S b/sys/lib/libkern/arch/m68k/strncpy.S
deleted file mode 100644
index d9d9363024c..00000000000
--- a/sys/lib/libkern/arch/m68k/strncpy.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $OpenBSD: strncpy.S,v 1.5 2013/02/02 13:32:06 miod 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. 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"
-
-ENTRY(strncpy)
- movl %sp@(4),%d0 | return value is toaddr
- movl %sp@(12),%d1 | count
- beq scdone | nothing to do
- movl %sp@(8),%a0 | a0 = fromaddr
- movl %d0,%a1 | a1 = toaddr
-scloop:
- movb %a0@+,%a1@+ | copy a byte
- beq scploop | copied null, go pad if necessary
- subql #1,%d1 | adjust count
- bne scloop | more room, keep going
-scdone:
- rts
-scploop:
- subql #1,%d1 | adjust count
- beq scdone | no more room, all done
- clrb %a1@+ | clear a byte
- jra scploop | keep going