diff options
author | 2014-03-18 22:36:27 +0000 | |
---|---|---|
committer | 2014-03-18 22:36:27 +0000 | |
commit | fbe7d4c033ce635420b2c13710eea55df02e4009 (patch) | |
tree | c4a7e9952fd10b8bab25ad2f7306fb43eba193a0 /lib/libc | |
parent | To prevent lock ordering problems with the kernel lock, we need to make sure (diff) | |
download | wireguard-openbsd-fbe7d4c033ce635420b2c13710eea55df02e4009.tar.xz wireguard-openbsd-fbe7d4c033ce635420b2c13710eea55df02e4009.zip |
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 'lib/libc')
103 files changed, 9 insertions, 4146 deletions
diff --git a/lib/libc/arch/m68k/DEFS.h b/lib/libc/arch/m68k/DEFS.h deleted file mode 100644 index 36c7aa7b133..00000000000 --- a/lib/libc/arch/m68k/DEFS.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $OpenBSD: DEFS.h,v 1.2 1996/08/19 08:13:48 tholo Exp $ */ - -#include <machine/asm.h> diff --git a/lib/libc/arch/m68k/Makefile.inc b/lib/libc/arch/m68k/Makefile.inc deleted file mode 100644 index 5cab7e867c3..00000000000 --- a/lib/libc/arch/m68k/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.3 1996/08/19 08:13:49 tholo Exp $ - -KMINCLUDES= arch/m68k/DEFS.h arch/m68k/SYS.h -KMSRCS= bcmp.S bzero.S ffs.S strcat.S strcmp.S strcpy.S strlen.S strncmp.S \ - strncpy.S htonl.S htons.S ntohl.S ntohs.S diff --git a/lib/libc/arch/m68k/SYS.h b/lib/libc/arch/m68k/SYS.h deleted file mode 100644 index f478d7a7c67..00000000000 --- a/lib/libc/arch/m68k/SYS.h +++ /dev/null @@ -1,105 +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. - * - * $OpenBSD: SYS.h,v 1.17 2013/02/02 13:29:14 miod Exp $ - */ - -#include <sys/syscall.h> -#include <machine/asm.h> - -#define _IMMEDIATE_ # - -#ifdef __STDC__ -# define __ENTRY(p,x) ENTRY(p##x) -# define __DO_SYSCALL(x) \ - movl _IMMEDIATE_ SYS_##x, %d0; \ - trap _IMMEDIATE_ 0 -# define __LABEL2(p,x) _C_LABEL(p##x) -#else -# define __ENTRY(p,x) ENTRY(p/**/x) -# define __DO_SYSCALL(x) \ - movl _IMMEDIATE_ SYS_/**/x, %d0;\ - trap _IMMEDIATE_ 0 -# define __LABEL2(p,x) _C_LABEL(p/**/x) -#endif - -/* perform a syscall */ - -#define __SYSCALL_NOERROR(p,x,y) \ - __ENTRY(p,x); \ - __ALIAS(p,x); \ - __DO_SYSCALL(y) - -/* perform a syscall, set errno */ - -#define __SYSCALL(p,x,y) \ - .even; \ - err: jra PIC_PLT(__cerror); \ - __SYSCALL_NOERROR(p,x,y); \ - jcs err - -/* perform a syscall, return */ - -#define __PSEUDO_NOERROR(p,x,y) \ - __SYSCALL_NOERROR(p,x,y); \ - rts - -/* perform a syscall, set errno, return */ - -#define __PSEUDO(p,x,y) \ - __SYSCALL(p,x,y); \ - rts - - -#ifdef __STDC__ -#define __ALIAS(prefix,name) \ - WEAK_ALIAS(name,prefix##name); -#else -#define __ALIAS(prefix,name) \ - WEAK_ALIAS(name,prefix/**/name); -#endif - -/* - * System calls entry points are really named _thread_sys_{syscall}, - * and weakly aliased to the name {syscall}. This allows the thread - * library to replace system calls at link time. - */ -# define SYSCALL(x) __SYSCALL(_thread_sys_,x,x) -# define RSYSCALL(x) __PSEUDO(_thread_sys_,x,x) -# define PSEUDO(x,y) __PSEUDO(_thread_sys_,x,y) -# define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(_thread_sys_,x,y) -# define SYSENTRY(x) __ENTRY(_thread_sys_,x); \ - __ALIAS(_thread_sys_,x) - -#define ASMSTR .asciz - - .globl __cerror diff --git a/lib/libc/arch/m68k/gdtoa/Makefile.inc b/lib/libc/arch/m68k/gdtoa/Makefile.inc deleted file mode 100644 index 9b47fc51d00..00000000000 --- a/lib/libc/arch/m68k/gdtoa/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 2008/09/07 20:36:07 martynas Exp $ - -SRCS+= strtord.c strtorx.c diff --git a/lib/libc/arch/m68k/gdtoa/arith.h b/lib/libc/arch/m68k/gdtoa/arith.h deleted file mode 100644 index d16e11448ef..00000000000 --- a/lib/libc/arch/m68k/gdtoa/arith.h +++ /dev/null @@ -1,2 +0,0 @@ -#define IEEE_MC68k -#define Arith_Kind_ASL 2 diff --git a/lib/libc/arch/m68k/gdtoa/gd_qnan.h b/lib/libc/arch/m68k/gdtoa/gd_qnan.h deleted file mode 100644 index a660b1f623b..00000000000 --- a/lib/libc/arch/m68k/gdtoa/gd_qnan.h +++ /dev/null @@ -1,12 +0,0 @@ -#define f_QNAN 0x7fffffff -#define d_QNAN0 0x7fffffff -#define d_QNAN1 0xffffffff -#define ld_QNAN0 0x7fff0000 -#define ld_QNAN1 0xffffffff -#define ld_QNAN2 0xffffffff -#define ld_QNAN3 0x0 -#define ldus_QNAN0 0x7fff -#define ldus_QNAN1 0x0 -#define ldus_QNAN2 0xffff -#define ldus_QNAN3 0xffff -#define ldus_QNAN4 0xffff diff --git a/lib/libc/arch/m68k/gdtoa/strtold.c b/lib/libc/arch/m68k/gdtoa/strtold.c deleted file mode 100644 index 20b50655348..00000000000 --- a/lib/libc/arch/m68k/gdtoa/strtold.c +++ /dev/null @@ -1,45 +0,0 @@ -/* $OpenBSD: strtold.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */ -/*- - * Copyright (c) 2003 David Schultz <das@FreeBSD.ORG> - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - */ - -/* - * Machine-dependent glue to integrate David Gay's gdtoa - * package into libc for architectures where a long double - * is an IEEE extended precision number. - */ - -#include <float.h> - -#include "gdtoaimp.h" - -long double -strtold(const char * __restrict s, char ** __restrict sp) -{ - long double result; - - strtorx(s, sp, FLT_ROUNDS, &result); - return result; -} diff --git a/lib/libc/arch/m68k/gen/Makefile.inc b/lib/libc/arch/m68k/gen/Makefile.inc deleted file mode 100644 index b7ee20ce153..00000000000 --- a/lib/libc/arch/m68k/gen/Makefile.inc +++ /dev/null @@ -1,12 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.12 2012/04/19 19:14:56 deraadt Exp $ - -SRCS+= _setjmp.S fabs.S infinity.c ldexp.S \ - modf.S nan.c setjmp.S sigsetjmp.S -SRCS+= flt_rounds.S fpgetmask.S fpgetround.S fpgetsticky.S fpsetmask.S \ - fpsetround.S fpsetsticky.S -SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c isnormall.c signbitl.c -SRCS+= adddf3.S addsf3.S ashlsi3.S ashrsi3.S cmpdf2.S cmpsf2.S divdf3.S \ - divsf3.S divsi3.S extendsfdf2.S fixdfsi.S fixunsdfsi.S \ - floatsidf.S lshlsi3.S lshrsi3.S modsi3.S muldf3.S mulsf3.S mulsi3.S \ - negdf2.S negsf2.S saveregs.c subdf3.S subsf3.S truncdfsf2.S udivsi3.S \ - umodsi3.S umulsi3.S diff --git a/lib/libc/arch/m68k/gen/_setjmp.S b/lib/libc/arch/m68k/gen/_setjmp.S deleted file mode 100644 index a1808cbbcfd..00000000000 --- a/lib/libc/arch/m68k/gen/_setjmp.S +++ /dev/null @@ -1,79 +0,0 @@ -/* $OpenBSD: _setjmp.S,v 1.5 2013/02/02 13:29:14 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. - */ - -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a "return(v)" from - * the last call to - * _setjmp(a) - * by restoring registers from the stack, - * The previous signal state is NOT restored. - */ - -#include "DEFS.h" - -ENTRY(_setjmp) - movl %sp@(4),%a0 /* save area pointer */ - clrl %a0@+ /* no old onstack */ - clrl %a0@+ /* no old sigmask */ - movl %sp,%a0@+ /* save old SP */ - movl %a6,%a0@+ /* save old FP */ - clrl %a0@+ /* no old AP */ - movl %sp@,%a0@+ /* save old PC */ - clrl %a0@+ /* clear PS */ - moveml #0x3CFC,%a0@ /* save other non-scratch regs */ - clrl %d0 /* return zero */ - rts - -ENTRY(_longjmp) - movl %sp@(4),%a0 /* save area pointer */ - addql #8,%a0 /* skip onstack/sigmask */ - tstl %a0@ /* ensure non-zero SP */ - jeq botch /* oops! */ - movl %sp@(8),%d0 /* grab return value */ - jne ok /* non-zero ok */ - moveq #1,%d0 /* else make non-zero */ -ok: - movl %a0@+,%sp /* restore SP */ - movl %a0@+,%a6 /* restore FP */ - addql #4,%a0 /* skip AP */ - movl %a0@+,%sp@ /* restore PC */ - moveml %a0@(4),#0x3CFC /* restore non-scratch regs */ - rts - -botch: - jbsr PIC_PLT(_C_LABEL(longjmperror)) - stop #0 diff --git a/lib/libc/arch/m68k/gen/adddf3.S b/lib/libc/arch/m68k/gen/adddf3.S deleted file mode 100644 index b051bb55f87..00000000000 --- a/lib/libc/arch/m68k/gen/adddf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: adddf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* double + double */ -ENTRY(__adddf3) - fmoved %sp@(4),%fp0 - faddd %sp@(12),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/addsf3.S b/lib/libc/arch/m68k/gen/addsf3.S deleted file mode 100644 index d1816b4c395..00000000000 --- a/lib/libc/arch/m68k/gen/addsf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: addsf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* single + single */ -ENTRY(__addsf3) - fmoves %sp@(4),%fp0 - fadds %sp@(8),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/ashlsi3.S b/lib/libc/arch/m68k/gen/ashlsi3.S deleted file mode 100644 index 53748e01e25..00000000000 --- a/lib/libc/arch/m68k/gen/ashlsi3.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: ashlsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* int << int */ -ENTRY(__ashlsi3) - movel %sp@(8),%d1 - movel %sp@(4),%d0 - asll %d1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/ashrsi3.S b/lib/libc/arch/m68k/gen/ashrsi3.S deleted file mode 100644 index 32c7c438a86..00000000000 --- a/lib/libc/arch/m68k/gen/ashrsi3.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: ashrsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* int >> int */ -ENTRY(__ashrsi3) - movel %sp@(8),%d1 - movel %sp@(4),%d0 - asrl %d1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/cmpdf2.S b/lib/libc/arch/m68k/gen/cmpdf2.S deleted file mode 100644 index 0ee2e0f8b84..00000000000 --- a/lib/libc/arch/m68k/gen/cmpdf2.S +++ /dev/null @@ -1,49 +0,0 @@ -/* $OpenBSD: cmpdf2.S,v 1.5 2013/02/02 13:29:14 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" - -/* double > double: 1 */ -/* double < double: -1 */ -/* double == double: 0 */ -ENTRY(__cmpdf2) - fmoved %sp@(4),%fp0 - fcmpd %sp@(12),%fp0 - fbgt Lagtb - fslt %d0 - extbl %d0 - rts -Lagtb: - moveq #1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/cmpsf2.S b/lib/libc/arch/m68k/gen/cmpsf2.S deleted file mode 100644 index a8c01dffd2c..00000000000 --- a/lib/libc/arch/m68k/gen/cmpsf2.S +++ /dev/null @@ -1,49 +0,0 @@ -/* $OpenBSD: cmpsf2.S,v 1.5 2013/02/02 13:29:14 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" - -/* single > single: 1 */ -/* single < single: -1 */ -/* single == single: 0 */ -ENTRY(__cmpsf2) - fmoves %sp@(4),%fp0 - fcmps %sp@(8),%fp0 - fbgt Lagtb - fslt %d0 - extbl %d0 - rts -Lagtb: - moveq #1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/divdf3.S b/lib/libc/arch/m68k/gen/divdf3.S deleted file mode 100644 index e45801cd742..00000000000 --- a/lib/libc/arch/m68k/gen/divdf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: divdf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* double / double */ -ENTRY(__divdf3) - fmoved %sp@(4),%fp0 - fdivd %sp@(12),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/divsf3.S b/lib/libc/arch/m68k/gen/divsf3.S deleted file mode 100644 index 472f2f0d413..00000000000 --- a/lib/libc/arch/m68k/gen/divsf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: divsf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* single / single */ -ENTRY(__divsf3) - fmoves %sp@(4),%fp0 - fdivs %sp@(8),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/divsi3.S b/lib/libc/arch/m68k/gen/divsi3.S deleted file mode 100644 index de45d79a740..00000000000 --- a/lib/libc/arch/m68k/gen/divsi3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: divsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* int / int */ -ENTRY(__divsi3) - movel %sp@(4),%d0 - divsl %sp@(8),%d0 - rts diff --git a/lib/libc/arch/m68k/gen/extendsfdf2.S b/lib/libc/arch/m68k/gen/extendsfdf2.S deleted file mode 100644 index a340d2722e1..00000000000 --- a/lib/libc/arch/m68k/gen/extendsfdf2.S +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: extendsfdf2.S,v 1.5 2013/02/02 13:29:14 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" - -/* (double) float */ -ENTRY(__extendsfdf2) - fmoves %sp@(4),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/fabs.S b/lib/libc/arch/m68k/gen/fabs.S deleted file mode 100644 index d25e45f24f9..00000000000 --- a/lib/libc/arch/m68k/gen/fabs.S +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: fabs.S,v 1.9 2013/02/02 13:29:14 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. - */ - -/* fabs - floating absolute value */ - -#include "DEFS.h" - -ENTRY(fabs) - fmoved %sp@(4),%fp0 - fjnlt L1 - fnegx %fp0 -L1: - rts diff --git a/lib/libc/arch/m68k/gen/fixdfsi.S b/lib/libc/arch/m68k/gen/fixdfsi.S deleted file mode 100644 index 603b94acb13..00000000000 --- a/lib/libc/arch/m68k/gen/fixdfsi.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: fixdfsi.S,v 1.5 2013/02/02 13:29:14 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" - -/* (int) double */ -ENTRY(__fixdfsi) - fintrzd %sp@(4),%fp0 - fmovel %fp0,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/fixunsdfsi.S b/lib/libc/arch/m68k/gen/fixunsdfsi.S deleted file mode 100644 index a8c0d85c1b2..00000000000 --- a/lib/libc/arch/m68k/gen/fixunsdfsi.S +++ /dev/null @@ -1,48 +0,0 @@ -/* $OpenBSD: fixunsdfsi.S,v 1.5 2013/02/02 13:29:14 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" - -/* (unsigned) double */ -ENTRY(__fixunsdfsi) - fintrzd %sp@(4),%fp0 - fcmpd #0r2147483648.0,%fp0 - fbge Lwaybig - fmovel %fp0,%d0 - rts -Lwaybig: - fsubd #0r2147483648.0,%fp0 - fmovel %fp0,%d0 - bset #31,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/floatsidf.S b/lib/libc/arch/m68k/gen/floatsidf.S deleted file mode 100644 index dadcc71175d..00000000000 --- a/lib/libc/arch/m68k/gen/floatsidf.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: floatsidf.S,v 1.5 2013/02/02 13:29:14 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" - -/* (double) int */ -ENTRY(__floatsidf) - fmovel %sp@(4),%fp0 - rts - diff --git a/lib/libc/arch/m68k/gen/flt_rounds.S b/lib/libc/arch/m68k/gen/flt_rounds.S deleted file mode 100644 index a3bf134b3ae..00000000000 --- a/lib/libc/arch/m68k/gen/flt_rounds.S +++ /dev/null @@ -1,24 +0,0 @@ -/* $OpenBSD: flt_rounds.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#include <machine/asm.h> - - .text - .even -#if 0 -/* XXX This is, effectively, an exclusive-or with 1 operation. */ -_map: - .byte 1 /* round to nearest */ - .byte 0 /* round to zero */ - .byte 3 /* round to negative infinity */ - .byte 2 /* round to positive infinity */ -#endif - -ENTRY(__flt_rounds) - fmovel %fpcr,%d0 - bfextu %d0{#26:#2},%d0 - eorib #1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/fpclassifyl.c b/lib/libc/arch/m68k/gen/fpclassifyl.c deleted file mode 100644 index 19940cdd53d..00000000000 --- a/lib/libc/arch/m68k/gen/fpclassifyl.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: fpclassifyl.c,v 1.1 2008/09/07 20:36:07 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__fpclassifyl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - if (p->ext_exp == 0) { - if (p->ext_frach == 0 && p->ext_fracl == 0) - return FP_ZERO; - else - return FP_SUBNORMAL; - } - - p->ext_frach &= ~0x80000000; /* clear normalization bit */ - - if (p->ext_exp == EXT_EXP_INFNAN) { - if (p->ext_frach == 0 && p->ext_fracl == 0) - return FP_INFINITE; - else - return FP_NAN; - } - - return FP_NORMAL; -} diff --git a/lib/libc/arch/m68k/gen/fpgetmask.S b/lib/libc/arch/m68k/gen/fpgetmask.S deleted file mode 100644 index bc30ed8e550..00000000000 --- a/lib/libc/arch/m68k/gen/fpgetmask.S +++ /dev/null @@ -1,12 +0,0 @@ -/* $OpenBSD: fpgetmask.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by Charles M. Hannum, Apr 9, 1995 - * Public domain. - */ - -#include <machine/asm.h> - -ENTRY(fpgetmask) - fmovel %fpcr,%d0 - bfextu %d0{#18:#5},%d0 - rts diff --git a/lib/libc/arch/m68k/gen/fpgetround.S b/lib/libc/arch/m68k/gen/fpgetround.S deleted file mode 100644 index 6b69ffa4bd6..00000000000 --- a/lib/libc/arch/m68k/gen/fpgetround.S +++ /dev/null @@ -1,12 +0,0 @@ -/* $OpenBSD: fpgetround.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#include <machine/asm.h> - -ENTRY(fpgetround) - fmovel %fpcr,%d0 - bfextu %d0{#26:#2},%d0 - rts diff --git a/lib/libc/arch/m68k/gen/fpgetsticky.S b/lib/libc/arch/m68k/gen/fpgetsticky.S deleted file mode 100644 index 9fe4fb0355b..00000000000 --- a/lib/libc/arch/m68k/gen/fpgetsticky.S +++ /dev/null @@ -1,12 +0,0 @@ -/* $OpenBSD: fpgetsticky.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by Charles M. Hannum, Apr 9, 1995 - * Public domain. - */ - -#include <machine/asm.h> - -ENTRY(fpgetsticky) - fmovel %fpsr,%d0 - bfextu %d0{#24:#5},%d0 - rts diff --git a/lib/libc/arch/m68k/gen/fpsetmask.S b/lib/libc/arch/m68k/gen/fpsetmask.S deleted file mode 100644 index d628436b458..00000000000 --- a/lib/libc/arch/m68k/gen/fpsetmask.S +++ /dev/null @@ -1,17 +0,0 @@ -/* $OpenBSD: fpsetmask.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by Charles M. Hannum, Apr 9, 1995 - * Public Domain. - */ - -#include <machine/asm.h> - -ENTRY(fpsetmask) - movel %d2,%sp@- - fmovel %fpcr,%d1 - movel %sp@(8),%d2 - bfextu %d1{#18:#5},%d0 - bfins %d2,%d1{#18:#5} - movel %sp@+,%d2 - fmovel %d1,%fpcr - rts diff --git a/lib/libc/arch/m68k/gen/fpsetround.S b/lib/libc/arch/m68k/gen/fpsetround.S deleted file mode 100644 index 79c33b0a667..00000000000 --- a/lib/libc/arch/m68k/gen/fpsetround.S +++ /dev/null @@ -1,17 +0,0 @@ -/* $OpenBSD: fpsetround.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public Domain. - */ - -#include <machine/asm.h> - -ENTRY(fpsetround) - movel %d2,%sp@- - fmovel %fpcr,%d1 - movel %sp@(8),%d2 - bfextu %d1{#26,#2},%d0 - bfins %d2,%d1{#26:#2} - movel %sp@+,%d2 - fmovel %d1,%fpcr - rts diff --git a/lib/libc/arch/m68k/gen/fpsetsticky.S b/lib/libc/arch/m68k/gen/fpsetsticky.S deleted file mode 100644 index 499694fc415..00000000000 --- a/lib/libc/arch/m68k/gen/fpsetsticky.S +++ /dev/null @@ -1,17 +0,0 @@ -/* $OpenBSD: fpsetsticky.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ -/* - * Written by Charles M. Hannum, Apr 9, 1995 - * Public domain. - */ - -#include <machine/asm.h> - -ENTRY(fpsetsticky) - movel %d2,%sp@- - fmovel %fpsr,%d1 - movel %sp@(8),%d2 - bfextu %d1{#24:#5},%d0 - bfins %d2,%d1{#24:#5} - movel %sp@+,%d2 - fmovel %d1,%fpsr - rts diff --git a/lib/libc/arch/m68k/gen/infinity.c b/lib/libc/arch/m68k/gen/infinity.c deleted file mode 100644 index 0690ecdf0d0..00000000000 --- a/lib/libc/arch/m68k/gen/infinity.c +++ /dev/null @@ -1,7 +0,0 @@ -/* $OpenBSD: infinity.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ -/* infinity.c */ - -#include <math.h> - -/* bytes for +Infinity on a 68k */ -char __infinity[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; diff --git a/lib/libc/arch/m68k/gen/isfinitel.c b/lib/libc/arch/m68k/gen/isfinitel.c deleted file mode 100644 index 02a5602ea84..00000000000 --- a/lib/libc/arch/m68k/gen/isfinitel.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: isfinitel.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isfinitel(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp != EXT_EXP_INFNAN); -} diff --git a/lib/libc/arch/m68k/gen/isinfl.c b/lib/libc/arch/m68k/gen/isinfl.c deleted file mode 100644 index eab84e50759..00000000000 --- a/lib/libc/arch/m68k/gen/isinfl.c +++ /dev/null @@ -1,31 +0,0 @@ -/* $OpenBSD: isinfl.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isinfl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - p->ext_frach &= ~0x80000000; /* clear normalization bit */ - - return (p->ext_exp == EXT_EXP_INFNAN && - p->ext_frach == 0 && p->ext_fracl == 0); -} diff --git a/lib/libc/arch/m68k/gen/isnanl.c b/lib/libc/arch/m68k/gen/isnanl.c deleted file mode 100644 index 0fbecf2efcc..00000000000 --- a/lib/libc/arch/m68k/gen/isnanl.c +++ /dev/null @@ -1,31 +0,0 @@ -/* $OpenBSD: isnanl.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isnanl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - p->ext_frach &= ~0x80000000; /* clear normalization bit */ - - return (p->ext_exp == EXT_EXP_INFNAN && - (p->ext_frach != 0 || p->ext_fracl != 0)); -} diff --git a/lib/libc/arch/m68k/gen/isnormall.c b/lib/libc/arch/m68k/gen/isnormall.c deleted file mode 100644 index 97ce382671b..00000000000 --- a/lib/libc/arch/m68k/gen/isnormall.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: isnormall.c,v 1.2 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__isnormall(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return (p->ext_exp != 0 && p->ext_exp != EXT_EXP_INFNAN); -} diff --git a/lib/libc/arch/m68k/gen/ldexp.S b/lib/libc/arch/m68k/gen/ldexp.S deleted file mode 100644 index f6500aca644..00000000000 --- a/lib/libc/arch/m68k/gen/ldexp.S +++ /dev/null @@ -1,47 +0,0 @@ -/* $OpenBSD: ldexp.S,v 1.5 2013/02/02 13:29:14 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" - -/* - * double ldexp(val, exp) - * returns: val * (2**exp), for integer exp - */ -ENTRY(ldexp) - fmoved %sp@(4),%fp0 - fbeq Ldone - ftwotoxl %sp@(12),%fp1 - fmulx %fp1,%fp0 -Ldone: - rts diff --git a/lib/libc/arch/m68k/gen/lshlsi3.S b/lib/libc/arch/m68k/gen/lshlsi3.S deleted file mode 100644 index f961344a399..00000000000 --- a/lib/libc/arch/m68k/gen/lshlsi3.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: lshlsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* unsigned << unsigned */ -ENTRY(__lshlsi3) - movel %sp@(8),%d1 - movel %sp@(4),%d0 - lsll %d1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/lshrsi3.S b/lib/libc/arch/m68k/gen/lshrsi3.S deleted file mode 100644 index cb8071e899f..00000000000 --- a/lib/libc/arch/m68k/gen/lshrsi3.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: lshrsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* unsigned >> unsigned */ -ENTRY(__lshrsi3) - movel %sp@(8),%d1 - movel %sp@(4),%d0 - lsrl %d1,%d0 - rts diff --git a/lib/libc/arch/m68k/gen/modf.S b/lib/libc/arch/m68k/gen/modf.S deleted file mode 100644 index e87a7c4ab91..00000000000 --- a/lib/libc/arch/m68k/gen/modf.S +++ /dev/null @@ -1,47 +0,0 @@ -/* $OpenBSD: modf.S,v 1.7 2013/02/02 13:29:14 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" - -/* - * double modf(val, iptr) - * returns: xxx and n (in *iptr) where val == n.xxx - */ -ENTRY(modf) - fmoved %sp@(4),%fp0 - movel %sp@(12),%a0 - fintrzx %fp0,%fp1 - fmoved %fp1,%a0@ - fsubx %fp1,%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/modsi3.S b/lib/libc/arch/m68k/gen/modsi3.S deleted file mode 100644 index 1e712fd2ae4..00000000000 --- a/lib/libc/arch/m68k/gen/modsi3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: modsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* int % int */ -ENTRY(__modsi3) - movel %sp@(4),%d1 - divsll %sp@(8),%d0:%d1 - rts diff --git a/lib/libc/arch/m68k/gen/muldf3.S b/lib/libc/arch/m68k/gen/muldf3.S deleted file mode 100644 index 9fdc7359f86..00000000000 --- a/lib/libc/arch/m68k/gen/muldf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: muldf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* double * double */ -ENTRY(__muldf3) - fmoved %sp@(4),%fp0 - fmuld %sp@(12),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/mulsf3.S b/lib/libc/arch/m68k/gen/mulsf3.S deleted file mode 100644 index 3caa81c38e1..00000000000 --- a/lib/libc/arch/m68k/gen/mulsf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: mulsf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* single * single */ -ENTRY(__mulsf3) - fmoves %sp@(4),%fp0 - fmuls %sp@(8),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/mulsi3.S b/lib/libc/arch/m68k/gen/mulsi3.S deleted file mode 100644 index 5c87afff761..00000000000 --- a/lib/libc/arch/m68k/gen/mulsi3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: mulsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* int * int */ -ENTRY(__mulsi3) - movel %sp@(4),%d0 - mulsl %sp@(8),%d0 - rts diff --git a/lib/libc/arch/m68k/gen/nan.c b/lib/libc/arch/m68k/gen/nan.c deleted file mode 100644 index 92a2910e63b..00000000000 --- a/lib/libc/arch/m68k/gen/nan.c +++ /dev/null @@ -1,9 +0,0 @@ -/* $OpenBSD: nan.c,v 1.1 2008/07/24 09:31:06 martynas Exp $ */ - -/* Written by Martynas Venckus. Public Domain. */ - -#include <math.h> - -/* bytes for qNaN on a m68k (IEEE single format) */ -char __nan[] __attribute__((__aligned__(sizeof(float)))) = - { 0x7f, 0xc0, 0, 0 }; diff --git a/lib/libc/arch/m68k/gen/negdf2.S b/lib/libc/arch/m68k/gen/negdf2.S deleted file mode 100644 index c5c5ea30ebe..00000000000 --- a/lib/libc/arch/m68k/gen/negdf2.S +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: negdf2.S,v 1.5 2013/02/02 13:29:14 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" - -/* -double */ -ENTRY(__negdf2) - fnegd %sp@(4),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/negsf2.S b/lib/libc/arch/m68k/gen/negsf2.S deleted file mode 100644 index 311d5183243..00000000000 --- a/lib/libc/arch/m68k/gen/negsf2.S +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: negsf2.S,v 1.5 2013/02/02 13:29:14 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" - -/* -single */ -ENTRY(__negsf2) - fnegs %sp@(4),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/saveregs.c b/lib/libc/arch/m68k/gen/saveregs.c deleted file mode 100644 index 6316cfbfc5f..00000000000 --- a/lib/libc/arch/m68k/gen/saveregs.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $OpenBSD: saveregs.c,v 1.4 2005/08/07 16:40:14 espie 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. - */ - -__builtin_saveregs() -{ - abort(); -} diff --git a/lib/libc/arch/m68k/gen/setjmp.S b/lib/libc/arch/m68k/gen/setjmp.S deleted file mode 100644 index 161acadf949..00000000000 --- a/lib/libc/arch/m68k/gen/setjmp.S +++ /dev/null @@ -1,86 +0,0 @@ -/* $OpenBSD: setjmp.S,v 1.6 2013/02/02 13:29:14 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. - */ - -/* - * C library -- setjmp, longjmp - * - * longjmp(a,v) - * will generate a "return(v)" from - * the last call to - * setjmp(a) - * by restoring registers from the stack, - * and a struct sigcontext, see <signal.h> - */ - -#include "DEFS.h" - -ENTRY(setjmp) - subl #12,%sp /* space for sigaltstack args/rvals */ - clrl %sp@ /* don't change it... */ - movl %sp,%sp@(4) /* ...but return the current val */ - jbsr PIC_PLT(_C_LABEL(sigaltstack)) - /* note: flags returned in %sp@(8) */ - clrl %sp@ /* don't change mask, just return old value */ - jbsr PIC_PLT(_C_LABEL(sigblock)) - movl %sp@(8),%d1 /* old flags value */ - andl #1,%d1 /* extract onstack flag */ - addl #12,%sp - movl %sp@(4),%a0 /* save area pointer */ - movl %d1,%a0@+ /* save old onstack value */ - movl %d0,%a0@+ /* save old signal mask */ - lea %sp@(4),%a1 /* adjust saved SP since we won't rts */ - movl %a1,%a0@+ /* save old SP */ - movl %a6,%a0@+ /* save old FP */ - clrl %a0@+ /* no AP */ - movl %sp@,%a0@+ /* save old PC */ - clrl %a0@+ /* clean PS */ - moveml #0x3CFC,%a0@ /* save remaining non-scratch regs */ - clrl %d0 /* return 0 */ - rts - -ENTRY(longjmp) - movl %sp@(4),%a0 /* save area pointer */ - tstl %a0@(8) /* ensure non-zero SP */ - jeq botch /* oops! */ - movl %sp@(8),%d0 /* grab return value */ - jne ok /* non-zero ok */ - moveq #1,%d0 /* else make non-zero */ -ok: - moveml %a0@(28),#0x3CFC/* restore non-scratch regs */ - movl %a0,%sp@- /* let sigreturn finish for us */ - jbsr PIC_PLT(_C_LABEL(sigreturn)) - -botch: - jbsr PIC_PLT(_C_LABEL(longjmperror)) - stop #0 diff --git a/lib/libc/arch/m68k/gen/signbitl.c b/lib/libc/arch/m68k/gen/signbitl.c deleted file mode 100644 index 1f9f7ab332d..00000000000 --- a/lib/libc/arch/m68k/gen/signbitl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* $OpenBSD: signbitl.c,v 1.1 2008/12/09 19:52:33 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/ieee.h> -#include <math.h> - -int -__signbitl(long double e) -{ - struct ieee_ext *p = (struct ieee_ext *)&e; - - return p->ext_sign; -} diff --git a/lib/libc/arch/m68k/gen/sigsetjmp.S b/lib/libc/arch/m68k/gen/sigsetjmp.S deleted file mode 100644 index 595cddf2181..00000000000 --- a/lib/libc/arch/m68k/gen/sigsetjmp.S +++ /dev/null @@ -1,68 +0,0 @@ -/* $OpenBSD: sigsetjmp.S,v 1.6 2013/02/02 13:29:14 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. - */ - -/* - * C library -- sigsetjmp, siglongjmp - * - * siglongjmp(a,v) - * will generate a "return(v)" from - * the last call to - * sigsetjmp(a,m) - * by restoring registers from the stack, - * The previous signal state is restored if 'm' was non-zero. - */ - -#include "DEFS.h" - -/* grab _JBLEN */ -#include <m68k/setjmp.h> - -ENTRY(sigsetjmp) - movl %sp@(8),%d1 /* grab the mask */ - movl %sp@(4),%a0 /* grab the area pointer */ - movl %d1,%a0@(_JBLEN * 4 ) /* save at end of area */ - tstl %d1 - bne dosig - jra PIC_PLT(_C_LABEL(_setjmp)) -dosig: - jra PIC_PLT(_C_LABEL(setjmp)) - - -ENTRY(siglongjmp) - movl %sp@(4),%a0 /* save area pointer */ - tstl %a0@(_JBLEN * 4) /* check mask... */ - bne didsig - jra PIC_PLT(_C_LABEL(_longjmp)) -didsig: - jra PIC_PLT(_C_LABEL(longjmp)) diff --git a/lib/libc/arch/m68k/gen/subdf3.S b/lib/libc/arch/m68k/gen/subdf3.S deleted file mode 100644 index 07a425a97c1..00000000000 --- a/lib/libc/arch/m68k/gen/subdf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: subdf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* double - double */ -ENTRY(__subdf3) - fmoved %sp@(4),%fp0 - fsubd %sp@(12),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/subsf3.S b/lib/libc/arch/m68k/gen/subsf3.S deleted file mode 100644 index 9914141d8e3..00000000000 --- a/lib/libc/arch/m68k/gen/subsf3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: subsf3.S,v 1.5 2013/02/02 13:29:14 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" - -/* single - single */ -ENTRY(__subsf3) - fmoves %sp@(4),%fp0 - fsubs %sp@(8),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/truncdfsf2.S b/lib/libc/arch/m68k/gen/truncdfsf2.S deleted file mode 100644 index a14c83d3b0c..00000000000 --- a/lib/libc/arch/m68k/gen/truncdfsf2.S +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: truncdfsf2.S,v 1.5 2013/02/02 13:29:14 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" - -/* (float) double */ -ENTRY(__truncdfsf2) - fmoved %sp@(4),%fp0 - rts diff --git a/lib/libc/arch/m68k/gen/udivsi3.S b/lib/libc/arch/m68k/gen/udivsi3.S deleted file mode 100644 index 425b61289e8..00000000000 --- a/lib/libc/arch/m68k/gen/udivsi3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: udivsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* unsigned / unsigned */ -ENTRY(__udivsi3) - movel %sp@(4),%d0 - divul %sp@(8),%d0 - rts diff --git a/lib/libc/arch/m68k/gen/umodsi3.S b/lib/libc/arch/m68k/gen/umodsi3.S deleted file mode 100644 index 875eb675f0b..00000000000 --- a/lib/libc/arch/m68k/gen/umodsi3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: umodsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* unsigned % unsigned */ -ENTRY(__umodsi3) - movel %sp@(4),%d1 - divull %sp@(8),%d0:%d1 - rts diff --git a/lib/libc/arch/m68k/gen/umulsi3.S b/lib/libc/arch/m68k/gen/umulsi3.S deleted file mode 100644 index 41f3d841b77..00000000000 --- a/lib/libc/arch/m68k/gen/umulsi3.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: umulsi3.S,v 1.5 2013/02/02 13:29:14 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" - -/* unsigned * unsigned */ -ENTRY(__umulsi3) - movel %sp@(4),%d0 - mulul %sp@(8),%d0 - rts diff --git a/lib/libc/arch/m68k/net/Makefile.inc b/lib/libc/arch/m68k/net/Makefile.inc deleted file mode 100644 index 80584144bcc..00000000000 --- a/lib/libc/arch/m68k/net/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.4 2012/09/04 03:10:42 okan Exp $ - -SRCS+= htonl.S htons.S ntohl.S ntohs.S diff --git a/lib/libc/arch/m68k/net/htonl.S b/lib/libc/arch/m68k/net/htonl.S deleted file mode 100644 index 48130bfa1b7..00000000000 --- a/lib/libc/arch/m68k/net/htonl.S +++ /dev/null @@ -1,40 +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. - */ - -/* netorder = htonl(hostorder) */ - -#include "DEFS.h" - -ENTRY(htonl) - movl %sp@(4),%d0 - rts diff --git a/lib/libc/arch/m68k/net/htons.S b/lib/libc/arch/m68k/net/htons.S deleted file mode 100644 index 3fe9cfab4e2..00000000000 --- a/lib/libc/arch/m68k/net/htons.S +++ /dev/null @@ -1,41 +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. - */ - -/* hostorder = htons(netorder) */ - -#include "DEFS.h" - -ENTRY(htons) - clrl %d0 - movw %sp@(6),%d0 - rts diff --git a/lib/libc/arch/m68k/net/ntohl.S b/lib/libc/arch/m68k/net/ntohl.S deleted file mode 100644 index a920b6fd86b..00000000000 --- a/lib/libc/arch/m68k/net/ntohl.S +++ /dev/null @@ -1,40 +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. - */ - -/* hostorder = ntohl(netorder) */ - -#include "DEFS.h" - -ENTRY(ntohl) - movl %sp@(4),%d0 - rts diff --git a/lib/libc/arch/m68k/net/ntohs.S b/lib/libc/arch/m68k/net/ntohs.S deleted file mode 100644 index 20864fcb6fa..00000000000 --- a/lib/libc/arch/m68k/net/ntohs.S +++ /dev/null @@ -1,41 +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. - */ - -/* hostorder = ntohs(netorder) */ - -#include "DEFS.h" - -ENTRY(ntohs) - clrl %d0 - movw %sp@(6),%d0 - rts diff --git a/lib/libc/arch/m68k/stdlib/abs.S b/lib/libc/arch/m68k/stdlib/abs.S deleted file mode 100644 index 3dca0d6b333..00000000000 --- a/lib/libc/arch/m68k/stdlib/abs.S +++ /dev/null @@ -1,43 +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. - */ - -/* abs - int absolute value */ - -#include "DEFS.h" - -ENTRY(abs) - movl %sp@(4),%d0 - jge L1 - negl %d0 -L1: - rts diff --git a/lib/libc/arch/m68k/stdlib/insque.S b/lib/libc/arch/m68k/stdlib/insque.S deleted file mode 100644 index a77e3f20e35..00000000000 --- a/lib/libc/arch/m68k/stdlib/insque.S +++ /dev/null @@ -1,50 +0,0 @@ -/* $OpenBSD: insque.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * 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: "@(#)insque.s 8.1 (Berkeley) 6/4/93" - */ - -/* insque(new, pred) */ - -#include "DEFS.h" - -ENTRY(insque) - movl %sp@(8),%a0 - movl %sp@(4),%a1 - movl %a0@,%a1@ - movl %a0,%a1@(4) - movl %a1,%a0@ - movl %a1@,%a0 - movl %a1,%a0@(4) - rts diff --git a/lib/libc/arch/m68k/stdlib/remque.S b/lib/libc/arch/m68k/stdlib/remque.S deleted file mode 100644 index 80175876cec..00000000000 --- a/lib/libc/arch/m68k/stdlib/remque.S +++ /dev/null @@ -1,48 +0,0 @@ -/* $OpenBSD: remque.S,v 1.4 2013/02/02 13:29:14 miod Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * 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: "@(#)remque.s 8.1 (Berkeley) 6/4/93" - */ - -/* remque(entry) */ - -#include "DEFS.h" - -ENTRY(remque) - movl %sp@(4),%a0 - movl %a0@,%a1 - movl %a0@(4),%a0 - movl %a0,%a1@(4) - movl %a1,%a0@ - rts diff --git a/lib/libc/arch/m68k/string/Makefile.inc b/lib/libc/arch/m68k/string/Makefile.inc deleted file mode 100644 index 8c8cbf4aa7a..00000000000 --- a/lib/libc/arch/m68k/string/Makefile.inc +++ /dev/null @@ -1,7 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.7 2012/09/04 03:10:42 okan Exp $ - -SRCS+= bcmp.S bcopy.S bzero.S ffs.S index.S memchr.c memcmp.S memset.S \ - rindex.S strcat.S strcmp.S strcpy.S strcspn.c strlcpy.S 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 deleted file mode 100644 index e786fec6947..00000000000 --- a/lib/libc/arch/m68k/string/bcmp.S +++ /dev/null @@ -1,82 +0,0 @@ -/* $OpenBSD: bcmp.S,v 1.6 2013/02/02 13:29:14 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" - -/* bcmp(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(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/lib/libc/arch/m68k/string/bcopy.S b/lib/libc/arch/m68k/string/bcopy.S deleted file mode 100644 index 5be54a74a63..00000000000 --- a/lib/libc/arch/m68k/string/bcopy.S +++ /dev/null @@ -1,125 +0,0 @@ -/* $OpenBSD: bcopy.S,v 1.6 2013/02/02 13:29:14 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 2-10 times - * faster than the C version in the portable gen directory. - * - * Things that might help: - * - unroll the longword copy loop (might not be good for a 68020) - * - longword align when possible (only on the 68020) - * - use nested DBcc instructions or use one and limit size to 64K - */ -#ifdef MEMCOPY -ENTRY(memcpy) -#else -#ifdef MEMMOVE -ENTRY(memmove) -#else -ENTRY(bcopy) -#endif -#endif - movl %sp@(12),%d1 | check count - beq bcdone | == 0, do not do anything -#if defined(MEMCOPY) || defined(MEMMOVE) - movl %sp@(4),%a1 | dest address - movl %sp@(8),%a0 | src address -#else - movl %sp@(4),%a0 | src address - movl %sp@(8),%a1 | dest address -#endif - cmpl %a1,%a0 | src after dest? - blt bcback | yes, must copy backwards - movl %a0,%d0 - btst #0,%d0 | src address odd? - beq bcfeven | no, skip alignment - movb %a0@+,%a1@+ | yes, copy a byte - subql #1,%d1 | adjust count - beq bcdone | count 0, all done -bcfeven: - movl %a1,%d0 - btst #0,%d0 | dest address odd? - bne bcfbloop | yes, no hope for alignment, copy bytes - movl %d1,%d0 | no, both even - lsrl #2,%d0 | convert count to longword count - beq bcfbloop | count 0, skip longword loop -bcflloop: - movl %a0@+,%a1@+ | copy a longword - subql #1,%d0 | adjust count - bne bcflloop | still more, keep copying - andl #3,%d1 | what remains - beq bcdone | nothing, all done -bcfbloop: - movb %a0@+,%a1@+ | copy a byte - subql #1,%d1 | adjust count - bne bcfbloop | still more, keep going -bcdone: -#if defined(MEMCOPY) || defined(MEMMOVE) - movl %sp@(4),%d0 | dest address - moveal %d0,%a0 -#endif - rts -bcback: - addl %d1,%a0 | src pointer to end - addl %d1,%a1 | dest pointer to end - movl %a0,%d0 - btst #0,%d0 | src address odd? - beq bcbeven | no, skip alignment - movb %a0@-,%a1@- | yes, copy a byte - subql #1,%d1 | adjust count - beq bcdone | count 0, all done -bcbeven: - movl %a1,%d0 - btst #0,%d0 | dest address odd? - bne bcbbloop | yes, no hope for alignment, copy bytes - movl %d1,%d0 | no, both even - lsrl #2,%d0 | convert count to longword count - beq bcbbloop | count 0, skip longword loop -bcblloop: - movl %a0@-,%a1@- | copy a longword - subql #1,%d0 | adjust count - bne bcblloop | still more, keep copying - andl #3,%d1 | what remains - beq bcdone | nothing, all done -bcbbloop: - movb %a0@-,%a1@- | copy a byte - subql #1,%d1 | adjust count - bne bcbbloop | still more, keep going -#if defined(MEMCOPY) || defined(MEMMOVE) - movl %sp@(4),%d0 | dest address - moveal %d0,%a0 -#endif - rts diff --git a/lib/libc/arch/m68k/string/bzero.S b/lib/libc/arch/m68k/string/bzero.S deleted file mode 100644 index a9615410e25..00000000000 --- a/lib/libc/arch/m68k/string/bzero.S +++ /dev/null @@ -1,71 +0,0 @@ -/* $OpenBSD: bzero.S,v 1.6 2013/02/02 13:29:14 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/lib/libc/arch/m68k/string/ffs.S b/lib/libc/arch/m68k/string/ffs.S deleted file mode 100644 index 0cbd45426d0..00000000000 --- a/lib/libc/arch/m68k/string/ffs.S +++ /dev/null @@ -1,47 +0,0 @@ -/* $OpenBSD: ffs.S,v 1.6 2013/02/02 13:29:14 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" - -/* bit = ffs(value) */ - -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/lib/libc/arch/m68k/string/index.S b/lib/libc/arch/m68k/string/index.S deleted file mode 100644 index 3d637e12bb3..00000000000 --- a/lib/libc/arch/m68k/string/index.S +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: index.S,v 1.6 2013/02/02 13:29:14 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" - -#ifdef STRCHR -ENTRY(strchr) -#else -ENTRY(index) -#endif - movl %sp@(4),%a0 | string - movb %sp@(11),%d0 | char to look for -ixloop: - cmpb %a0@,%d0 | found our char? - beq ixfound | yes, break out - tstb %a0@+ | null? - bne ixloop | no, keep going - moveq #0,%d0 | not found, return null - moveal %d0,%a0 - rts -ixfound: - movl %a0,%d0 | found, return pointer - rts diff --git a/lib/libc/arch/m68k/string/memcmp.S b/lib/libc/arch/m68k/string/memcmp.S deleted file mode 100644 index b34565d42bb..00000000000 --- a/lib/libc/arch/m68k/string/memcmp.S +++ /dev/null @@ -1,91 +0,0 @@ -/* $OpenBSD: memcmp.S,v 1.6 2013/02/02 13:29:14 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/lib/libc/arch/m68k/string/memcpy.S b/lib/libc/arch/m68k/string/memcpy.S deleted file mode 100644 index 0df21e9eb08..00000000000 --- a/lib/libc/arch/m68k/string/memcpy.S +++ /dev/null @@ -1,3 +0,0 @@ -/* $OpenBSD: memcpy.S,v 1.3 2005/08/07 16:40:14 espie Exp $ */ -#define MEMCOPY -#include "bcopy.S" diff --git a/lib/libc/arch/m68k/string/memmove.S b/lib/libc/arch/m68k/string/memmove.S deleted file mode 100644 index 489eeeee24e..00000000000 --- a/lib/libc/arch/m68k/string/memmove.S +++ /dev/null @@ -1,3 +0,0 @@ -/* $OpenBSD: memmove.S,v 1.3 2005/08/07 16:40:14 espie Exp $ */ -#define MEMMOVE -#include "bcopy.S" diff --git a/lib/libc/arch/m68k/string/memset.S b/lib/libc/arch/m68k/string/memset.S deleted file mode 100644 index 2d868d36036..00000000000 --- a/lib/libc/arch/m68k/string/memset.S +++ /dev/null @@ -1,86 +0,0 @@ -/* $OpenBSD: memset.S,v 1.6 2013/02/02 13:29:14 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 -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 - moveal %d0,%a0 - movl %sp@+,%d2 - rts diff --git a/lib/libc/arch/m68k/string/rindex.S b/lib/libc/arch/m68k/string/rindex.S deleted file mode 100644 index 70fff50a7f7..00000000000 --- a/lib/libc/arch/m68k/string/rindex.S +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: rindex.S,v 1.6 2013/02/02 13:29:14 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" - -#ifdef STRRCHR -ENTRY(strrchr) -#else -ENTRY(rindex) -#endif - movl %sp@(4),%a0 | string - movb %sp@(11),%d0 | char to look for - subl %a1,%a1 | clear rindex pointer -rixloop: - cmpb %a0@,%d0 | found our char? - bne rixnope | no, check for null - movl %a0,%a1 | yes, remember location -rixnope: - tstb %a0@+ | null? - bne rixloop | no, keep going - movl %a1,%d0 | return value - moveal %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/string/strcat.S b/lib/libc/arch/m68k/string/strcat.S deleted file mode 100644 index ca149eb2ff1..00000000000 --- a/lib/libc/arch/m68k/string/strcat.S +++ /dev/null @@ -1,56 +0,0 @@ -/* $OpenBSD: strcat.S,v 1.8 2013/02/02 13:29:14 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" - -#if defined(APIWARN) -#APP - .section .gnu.warning.strcat - .ascii "warning: strcat() is almost always misused, consider using strlcat()" -#NO_APP -#endif - -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 - moveal %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/string/strchr.S b/lib/libc/arch/m68k/string/strchr.S deleted file mode 100644 index 3da26834e26..00000000000 --- a/lib/libc/arch/m68k/string/strchr.S +++ /dev/null @@ -1,3 +0,0 @@ -/* $OpenBSD: strchr.S,v 1.3 2005/08/07 16:40:14 espie Exp $ */ -#define STRCHR -#include "index.S" diff --git a/lib/libc/arch/m68k/string/strcmp.S b/lib/libc/arch/m68k/string/strcmp.S deleted file mode 100644 index 039d9118a09..00000000000 --- a/lib/libc/arch/m68k/string/strcmp.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: strcmp.S,v 1.6 2013/02/02 13:29:14 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/lib/libc/arch/m68k/string/strcpy.S b/lib/libc/arch/m68k/string/strcpy.S deleted file mode 100644 index edd326df6d0..00000000000 --- a/lib/libc/arch/m68k/string/strcpy.S +++ /dev/null @@ -1,53 +0,0 @@ -/* $OpenBSD: strcpy.S,v 1.9 2013/02/02 13:29:14 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" - - -#if defined(APIWARN) -#APP - .section .gnu.warning.strcpy - .ascii "warning: strcpy() is almost always misused, consider using strlcpy()" -#NO_APP -#endif - -ENTRY(strcpy) - movl %sp@(8),%a0 | a0 = fromaddr - movl %sp@(4),%d0 | return value is toaddr - movl %d0,%a1 | a1 = toaddr -scloop: - movb %a0@+,%a1@+ | copy a byte - bne scloop | copied non-null, keep going - moveal %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/string/strlcpy.S b/lib/libc/arch/m68k/string/strlcpy.S deleted file mode 100644 index 85243e5a2a7..00000000000 --- a/lib/libc/arch/m68k/string/strlcpy.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: strlcpy.S,v 1.8 2013/02/02 13:29:14 miod Exp $ */ -/* - * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "DEFS.h" - -/* - * It is faster to implement strlcpy() as two distinct operations, - * a strlen() and a memcpy(). Note that we *always* add a NUL, unless - * the count is 0. - * - * TODO: try unrolling the two main loops a bit - */ - -ENTRY(strlcpy) - movl %sp@(8),%a0 | a0 = src - movl %a0,%a1 | working copy of src ptr - movl %a0,%d0 | return (d0) value is len(src) - notl %d0 | take the complement of d0 -strlcpy_len: - tstb %a1@+ | did we hit the terminating NUL? - bne strlcpy_len | nope, keep going - addl %a1,%d0 - | now set things up to do the copy - movl %sp@(4),%a1 | a1 = dst - movl %sp@(12),%d1 | d1 = count - beq strlcpy_done | zero count, just return - - subql #1,%d1 | subtract one for the NUL - cmpl %d0, %d1 | must set d1 to MIN(d0, d1) - ble strlcpy_check | count - 1 <= len(src), so d1 is ok - movl %d0, %d1 | d1 is too big, set it to len(src) -strlcpy_check: - tstl %d1 | is d1 zero? - beq strlcpy_clear | if so, skip copy and set byte to NUL -strlcpy_copy: - movb %a0@+,%a1@+ | copy a byte - subql #1,%d1 | decrement count - bne strlcpy_copy | space left? continue copying... -strlcpy_clear: - clrb %a1@ | clear last byte -strlcpy_done: - moveal %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/string/strlen.S b/lib/libc/arch/m68k/string/strlen.S deleted file mode 100644 index f2ca58bbe58..00000000000 --- a/lib/libc/arch/m68k/string/strlen.S +++ /dev/null @@ -1,45 +0,0 @@ -/* $OpenBSD: strlen.S,v 1.6 2013/02/02 13:29:14 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(strlen) - movl %sp@(4),%a0 | string - movl %a0,%d0 - notl %d0 -slloop: - 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 deleted file mode 100644 index ed6a3022de1..00000000000 --- a/lib/libc/arch/m68k/string/strncmp.S +++ /dev/null @@ -1,62 +0,0 @@ -/* $OpenBSD: strncmp.S,v 1.6 2013/02/02 13:29:14 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/lib/libc/arch/m68k/string/strncpy.S b/lib/libc/arch/m68k/string/strncpy.S deleted file mode 100644 index b29bd43f6b3..00000000000 --- a/lib/libc/arch/m68k/string/strncpy.S +++ /dev/null @@ -1,55 +0,0 @@ -/* $OpenBSD: strncpy.S,v 1.6 2013/02/02 13:29:14 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: - moveal %d0,%a0 - rts -scploop: - subql #1,%d1 | adjust count - beq scdone | no more room, all done - clrb %a1@+ | clear a byte - jra scploop | keep going diff --git a/lib/libc/arch/m68k/string/strrchr.S b/lib/libc/arch/m68k/string/strrchr.S deleted file mode 100644 index 6ed607ac51b..00000000000 --- a/lib/libc/arch/m68k/string/strrchr.S +++ /dev/null @@ -1,4 +0,0 @@ -/* $OpenBSD: strrchr.S,v 1.3 2005/08/07 16:40:14 espie Exp $ */ - -#define STRRCHR -#include "rindex.S" diff --git a/lib/libc/arch/m68k/string/swab.S b/lib/libc/arch/m68k/string/swab.S deleted file mode 100644 index bd8c4679710..00000000000 --- a/lib/libc/arch/m68k/string/swab.S +++ /dev/null @@ -1,43 +0,0 @@ -/* $OpenBSD: swab.S,v 1.6 2013/02/02 13:29:14 miod Exp $ */ -/* - * Copyright (c) 2002 Marc Espie. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT 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 OPENBSD - * PROJECT 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(swab) - movl %sp@(12),%d1 | #bytes - lsrl #1,%d1 | -> #words - beq swab_end - subql #1,%d1 | for proper dbf behaviour - movl %sp@(4),%a0 | src - movl %sp@(8),%a1 | and dst -swab_loop: - movw %a0@+,%d0 - rorw #8,%d0 - movw %d0,%a1@+ - dbf %d1,swab_loop -swab_end: - rts - diff --git a/lib/libc/arch/m68k/sys/Ovfork.S b/lib/libc/arch/m68k/sys/Ovfork.S deleted file mode 100644 index e3c3cb7f8cd..00000000000 --- a/lib/libc/arch/m68k/sys/Ovfork.S +++ /dev/null @@ -1,71 +0,0 @@ -/* $OpenBSD: Ovfork.S,v 1.7 2013/02/02 13:29:14 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 "SYS.h" - -/* - * @(#)vfork.s 4.1 (Berkeley) 12/21/80 - * C library -- vfork - */ - -/* - * pid = vfork(); - * - * d1 == 0 in parent process, d1 == 1 in child process. - * d0 == pid of child in parent, d0 == pid of parent in child. - * - * trickery here, due to keith sklower, uses ret to clear the stack, - * and then returns with a jump indirect, since only one person can return - * with a ret off this stack... we do the ret before we vfork! - */ - -SYSENTRY(vfork) - movl %sp@+,%a0 - movl #SYS_vfork,%d0 - trap #0 - jcs err - subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */ - andl %d1,%d0 - jmp %a0@ -err: - .globl _C_LABEL(errno) -#ifdef __PIC__ - lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1 - movl %a1@(_C_LABEL(errno)@GOT:w),%a1 - movl %d0,%a1@ -#else - movl %d0,_C_LABEL(errno) -#endif - moveq #-1,%d0 - jmp %a0@ diff --git a/lib/libc/arch/m68k/sys/__get_tcb.S b/lib/libc/arch/m68k/sys/__get_tcb.S deleted file mode 100644 index 54ff014a9c9..00000000000 --- a/lib/libc/arch/m68k/sys/__get_tcb.S +++ /dev/null @@ -1,34 +0,0 @@ -/* $OpenBSD: __get_tcb.S,v 1.1 2013/02/02 13:29:14 miod Exp $ */ -/* $NetBSD: shmat.S,v 1.2 2008/04/28 20:22:56 martin Exp $ */ - -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "SYS.h" - -SYSCALL(__get_tcb) - movl %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/sys/brk.S b/lib/libc/arch/m68k/sys/brk.S deleted file mode 100644 index 38f003e7937..00000000000 --- a/lib/libc/arch/m68k/sys/brk.S +++ /dev/null @@ -1,70 +0,0 @@ -/* $OpenBSD: brk.S,v 1.8 2013/02/02 13:29:14 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 "SYS.h" - - .globl _end - .globl _C_LABEL(__minbrk) - .globl _C_LABEL(__curbrk) - - .data -_C_LABEL(__minbrk): - .long _end - .text - -ENTRY(brk) -#ifdef __PIC__ - lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1 - movl %a1@(_C_LABEL(__minbrk)@GOT:w),%a0 - movl %a0@,%d0 -#else - movl _C_LABEL(__minbrk),%d0 -#endif - cmpl %sp@(4),%d0 - jls ok - movl %d0,%sp@(4) -ok: - movl #SYS_break,%d0 - trap #0 - jcs err -#ifdef __PIC__ - movl %a1@(_C_LABEL(__curbrk)@GOT:w),%a0 - movl %sp@(4),%a0@ -#else - movl %sp@(4),_C_LABEL(__curbrk) -#endif - clrl %d0 - rts -err: - jra PIC_PLT(__cerror) diff --git a/lib/libc/arch/m68k/sys/cerror.S b/lib/libc/arch/m68k/sys/cerror.S deleted file mode 100644 index d76710d7308..00000000000 --- a/lib/libc/arch/m68k/sys/cerror.S +++ /dev/null @@ -1,52 +0,0 @@ -/* $OpenBSD: cerror.S,v 1.9 2013/02/02 13:29:14 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 "SYS.h" - -WEAK_ALIAS(_cerror,__cerror) - - .even - .globl _C_LABEL(errno) -__cerror: -#ifdef __PIC__ - lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0 - movl %a0@(_C_LABEL(errno)@GOT:w),%a0 - movl %d0,%a0@ -#else - movl %d0,_C_LABEL(errno) -#endif - movl #-1,%d0 - movl #-1,%d1 - moveal %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/sys/exect.S b/lib/libc/arch/m68k/sys/exect.S deleted file mode 100644 index 58318d67cfe..00000000000 --- a/lib/libc/arch/m68k/sys/exect.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: exect.S,v 1.6 2013/02/02 13:29:14 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 "SYS.h" -#include <machine/psl.h> - -ENTRY(exect) - movl #SYS_execve,%d0 - trap #0 - jra PIC_PLT(__cerror) /* exect(file, argv, env) */ diff --git a/lib/libc/arch/m68k/sys/fork.S b/lib/libc/arch/m68k/sys/fork.S deleted file mode 100644 index eeeaa32cc52..00000000000 --- a/lib/libc/arch/m68k/sys/fork.S +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: fork.S,v 1.5 2013/02/02 13:29:14 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 "SYS.h" - -SYSCALL(fork) - subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */ - andl %d1,%d0 - rts /* pid = fork() */ diff --git a/lib/libc/arch/m68k/sys/sbrk.S b/lib/libc/arch/m68k/sys/sbrk.S deleted file mode 100644 index a8d07a01a28..00000000000 --- a/lib/libc/arch/m68k/sys/sbrk.S +++ /dev/null @@ -1,66 +0,0 @@ -/* $OpenBSD: sbrk.S,v 1.7 2013/02/02 13:29:14 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 "SYS.h" - - .globl _end - .globl _C_LABEL(__curbrk) - - .data -_C_LABEL(__curbrk): - .long _end - .text - -ENTRY(sbrk) -#ifdef __PIC__ - lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1 - movl %a1@(_C_LABEL(__curbrk)@GOT:w),%a1 - movl %a1@,%d0 -#else - movl _C_LABEL(__curbrk),%d0 -#endif - addl %d0,%sp@(4) - movl #SYS_break,%d0 - trap #0 - jcs err -#ifdef __PIC__ - movl %a1@,%d0 - movl %sp@(4),%a1@ -#else - movl _C_LABEL(__curbrk),%d0 - movl %sp@(4),_C_LABEL(__curbrk) -#endif - rts -err: - jra PIC_PLT(__cerror) diff --git a/lib/libc/arch/m68k/sys/shmat.S b/lib/libc/arch/m68k/sys/shmat.S deleted file mode 100644 index edb1972fef4..00000000000 --- a/lib/libc/arch/m68k/sys/shmat.S +++ /dev/null @@ -1,34 +0,0 @@ -/* $OpenBSD: shmat.S,v 1.1 2013/02/02 13:29:14 miod Exp $ */ -/* $NetBSD: shmat.S,v 1.2 2008/04/28 20:22:56 martin Exp $ */ - -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "SYS.h" - -SYSCALL(shmat) - movl %d0,%a0 - rts diff --git a/lib/libc/arch/m68k/sys/sigpending.S b/lib/libc/arch/m68k/sys/sigpending.S deleted file mode 100644 index e42ba64273a..00000000000 --- a/lib/libc/arch/m68k/sys/sigpending.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: sigpending.S,v 1.5 2013/02/02 13:29:14 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 "SYS.h" - -SYSCALL(sigpending) - movl %sp@(4),%a0 - movl %d0,%a0@ - clrl %d0 - rts diff --git a/lib/libc/arch/m68k/sys/sigprocmask.S b/lib/libc/arch/m68k/sys/sigprocmask.S deleted file mode 100644 index 2a40aba059c..00000000000 --- a/lib/libc/arch/m68k/sys/sigprocmask.S +++ /dev/null @@ -1,58 +0,0 @@ -/* $OpenBSD: sigprocmask.S,v 1.7 2013/02/02 13:29:14 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 "SYS.h" - -SYSENTRY(sigprocmask) - tstl %sp@(8) /* check new sigset pointer */ - jne gotptr /* if not null, indirect */ -/* movl #0,%sp@(8) */ /* null mask pointer: block empty set */ - movl #1,%sp@(4) /* SIG_BLOCK */ - jra doit -gotptr: - movl %sp@(8),%a0 - movl %a0@,%sp@(8) /* indirect to new mask arg */ -doit: - movl #SYS_sigprocmask,%d0 - trap #0 - jcs err - tstl %sp@(12) /* test if old mask requested */ - jeq out - movl %sp@(12),%a0 - movl %d0,%a0@ /* store old mask */ -out: - clrl %d0 - rts -err: - jra PIC_PLT(__cerror) diff --git a/lib/libc/arch/m68k/sys/sigreturn.S b/lib/libc/arch/m68k/sys/sigreturn.S deleted file mode 100644 index 1071d52b4e9..00000000000 --- a/lib/libc/arch/m68k/sys/sigreturn.S +++ /dev/null @@ -1,58 +0,0 @@ -/* $OpenBSD: sigreturn.S,v 1.9 2013/02/02 13:29:14 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 "SYS.h" - -/* - * We must preserve the state of the registers as the user has set them up. - */ -#ifdef PROF -#undef ENTRY -/* XXX should bring into line with __ENTRY in SYS.h */ -#ifdef __STDC__ -#define ENTRY(x) \ - .globl _##x; .even; _##x:; moveml _IMMEDIATE_ 0xC0C0,%sp@-; .data; \ - PROF##x:; .long 0; .text; lea PROF##x,%a0; jbsr mcount; \ - moveml %sp@+,_IMMEDIATE_ 0x0303 -#else -#define ENTRY(x) \ - .globl _/**/x; .even; _/**/x:; moveml #0xC0C0,%sp@-; .data; \ - PROF/**/x:; .long 0; .text; lea PROF/**/x,%a0; jbsr mcount; \ - moveml %sp@+,#0x0303 -#endif -#endif /* PROF */ - -SYSENTRY(sigreturn) - trap #1 /* signals sigreturn() */ - jra PIC_PLT(__cerror) diff --git a/lib/libc/arch/m68k/sys/sigsuspend.S b/lib/libc/arch/m68k/sys/sigsuspend.S deleted file mode 100644 index 63c216cc507..00000000000 --- a/lib/libc/arch/m68k/sys/sigsuspend.S +++ /dev/null @@ -1,46 +0,0 @@ -/* $OpenBSD: sigsuspend.S,v 1.7 2013/02/02 13:29:14 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 "SYS.h" - -SYSENTRY(sigsuspend) - movl %sp@(4),%a0 - movl %a0@,%sp@(4) /* indirect to mask arg */ - movl #SYS_sigsuspend,%d0 - trap #0 - jcs err - clrl %d0 /* shouldn't happen */ - rts -err: - jra PIC_PLT(__cerror) diff --git a/lib/libc/arch/m68k/sys/syscall.S b/lib/libc/arch/m68k/sys/syscall.S deleted file mode 100644 index e8a30c96325..00000000000 --- a/lib/libc/arch/m68k/sys/syscall.S +++ /dev/null @@ -1,43 +0,0 @@ -/* $OpenBSD: syscall.S,v 1.7 2013/02/02 13:29:14 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 "SYS.h" - -SYSENTRY(syscall) - clrl %d0 - trap #0 - jcs err - rts -err: - jra PIC_PLT(__cerror) diff --git a/lib/libc/arch/m68k/sys/tfork_thread.S b/lib/libc/arch/m68k/sys/tfork_thread.S deleted file mode 100644 index 59e3cf246dd..00000000000 --- a/lib/libc/arch/m68k/sys/tfork_thread.S +++ /dev/null @@ -1,69 +0,0 @@ -/* $OpenBSD: tfork_thread.S,v 1.3 2013/02/02 13:29:14 miod Exp $ */ - -/* - * Copyright (c) 2005, Miodrag Vallat - * - * 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. - * - * 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 "SYS.h" - -/* - * int __tfork_thread(const struct __tfork *param, size_t psize, void (*func)(void *), void *arg); - */ -ENTRY(__tfork_thread) - /* - * Move info for the new thread into registers. - */ - movl %sp@(16), %a0 /* arg */ - movl %sp@(12), %a1 /* func */ - - /* - * We did not create a frame, so the stack is ready for an immediate - * system call invocation. - */ - __DO_SYSCALL(__tfork) - jcs 9f - - tstl %d0 - jeq 1f - - /* - * parent process: just return. - */ - rts - -1: - /* - * child process: invoke function, then exit. - */ - movl %a0, %sp@- /* stack with arg pushed on it */ - jsr %a1@ /* func */ - addq #4, %sp - - __DO_SYSCALL(__threxit) - -9: - /* - * system call failure. - */ - jra PIC_PLT(__cerror) diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index d75fe5f7b12..953c53382f6 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.48 2013/06/05 04:06:08 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.49 2014/03/18 22:36:29 miod Exp $ # stdlib sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib @@ -12,9 +12,7 @@ SRCS+= a64l.c abort.c atexit.c atoi.c atof.c atol.c atoll.c bsearch.c \ tfind.c tsearch.c _rand48.c drand48.c erand48.c jrand48.c lcong48.c \ lrand48.c mrand48.c nrand48.c seed48.c srand48.c qabs.c qdiv.c _Exit.c -.if (${MACHINE_CPU} == "m68k") -SRCS+= abs.S div.c labs.c ldiv.c -.elif (${MACHINE_CPU} == "i386") +.if (${MACHINE_CPU} == "i386") SRCS+= abs.S div.S labs.S ldiv.S .elif (${MACHINE_CPU} == "vax") SRCS+= abs.c div.c labs.c ldiv.c @@ -25,7 +23,7 @@ SRCS+= abs.c div.c labs.c ldiv.c SRCS+= abs.c div.c labs.c ldiv.c .endif -.if (${MACHINE_CPU} == "vax") || (${MACHINE_CPU} == "m68k") +.if (${MACHINE_CPU} == "vax") SRCS+= insque.S remque.S .else SRCS+= insque.c remque.c diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 417bb4e9b9b..07ce6e397cb 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.116 2013/10/13 23:30:12 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.117 2014/03/18 22:36:30 miod Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -58,10 +58,6 @@ ASM= __get_tcb.o __getcwd.o __semctl.o __set_tcb.o __syscall.o \ symlinkat.o sync.o sysarch.o umask.o unlink.o unlinkat.o \ unmount.o utimensat.o utimes.o utrace.o wait4.o write.o writev.o -# modules with specific implementations on some architectures, and the -# default implementation elsewhere: -SRCS_m68k= __get_tcb.S shmat.S - SRCS+= ${SRCS_${MACHINE_CPU}} .for i in ${SRCS_${MACHINE_CPU}} ASM:= ${ASM:N${i:R}.o} diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 70cf6a3a9b6..598f91a098c 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,8 +1,8 @@ -.\" $OpenBSD: ptrace.2,v 1.28 2014/01/21 03:15:45 schwarze Exp $ +.\" $OpenBSD: ptrace.2,v 1.29 2014/03/18 22:36:30 miod Exp $ .\" $NetBSD: ptrace.2,v 1.3 1996/02/23 01:39:41 jtc Exp $ .\" .\" This file is in the public domain. -.Dd $Mdocdate: January 21 2014 $ +.Dd $Mdocdate: March 18 2014 $ .Dt PTRACE 2 .Os .Sh NAME @@ -432,7 +432,7 @@ one instruction .\" m88k - vax (no general fp registers) .\" mips64 (fp registers in the main reg structure) .It Xo Dv PT_GETFPREGS -.No (not available on aviion, luna88k, mvme88k, sgi and vax) +.No (not available on aviion, luna88k, sgi and vax) .Xc This request reads the traced process' floating-point registers into the @@ -442,7 +442,7 @@ the pointed to by .Fa addr . .It Xo Dv PT_SETFPREGS -.No (not available on aviion, luna88k, mvme88k, sgi and vax) +.No (not available on aviion, luna88k, sgi and vax) .Xc This request is the converse of .Dv PT_GETFPREGS ; @@ -564,8 +564,7 @@ The system call first appeared in .At v6 . .Sh BUGS -On several RISC architectures (such as aviion, luna88k, mvme88k, sparc -and sparc64), +On several RISC architectures (such as aviion, luna88k, sparc and sparc64), the PC is set to the provided PC value for .Dv PT_CONTINUE and similar calls, and the remainder of the execution pipeline registers |