diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
commit | d6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch) | |
tree | ece253b876159b39c620e62b6c9b1174642e070e /sys/lib/libkern/arch/ns32k |
initial import of NetBSD tree
Diffstat (limited to 'sys/lib/libkern/arch/ns32k')
-rw-r--r-- | sys/lib/libkern/arch/ns32k/DEFS.h | 49 | ||||
-rw-r--r-- | sys/lib/libkern/arch/ns32k/Makefile.inc | 6 | ||||
-rw-r--r-- | sys/lib/libkern/arch/ns32k/SYS.h | 66 | ||||
-rw-r--r-- | sys/lib/libkern/arch/ns32k/htonl.S | 44 | ||||
-rw-r--r-- | sys/lib/libkern/arch/ns32k/htons.S | 42 | ||||
-rw-r--r-- | sys/lib/libkern/arch/ns32k/ntohl.S | 44 | ||||
-rw-r--r-- | sys/lib/libkern/arch/ns32k/ntohs.S | 42 |
7 files changed, 293 insertions, 0 deletions
diff --git a/sys/lib/libkern/arch/ns32k/DEFS.h b/sys/lib/libkern/arch/ns32k/DEFS.h new file mode 100644 index 00000000000..ff297d572ab --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/DEFS.h @@ -0,0 +1,49 @@ +/* $NetBSD: DEFS.h,v 1.2 1994/10/26 06:39:41 cgd Exp $ */ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)DEFS.h 5.1 (Berkeley) 4/23/90 + */ + +#ifdef PROF +#define ENTRY(x) .globl _/**/x; _/**/x: \ + .data; 1:; .long 0; .text; addr 1b,tos ; bsr mcount +#define ASENTRY(x) .globl x; x: \ + .data; 1:; .long 0; .text; addr 1b,tos ; bsr mcount +#else +#define ENTRY(x) .globl _/**/x; _/**/x: +#define ASENTRY(x) .globl x; x: +#endif diff --git a/sys/lib/libkern/arch/ns32k/Makefile.inc b/sys/lib/libkern/arch/ns32k/Makefile.inc new file mode 100644 index 00000000000..d4398986a7b --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/Makefile.inc @@ -0,0 +1,6 @@ +# $NetBSD: Makefile.inc,v 1.5.2.1 1995/10/13 20:29:29 phil Exp $ + +SRCS+= __main.c imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \ + bcmp.c ffs.c strcat.c strcmp.c strcpy.c strlen.c strncmp.c strncpy.c \ + scanc.c skpc.c locc.c \ + htonl.S htons.S ntohl.S ntohs.S diff --git a/sys/lib/libkern/arch/ns32k/SYS.h b/sys/lib/libkern/arch/ns32k/SYS.h new file mode 100644 index 00000000000..93ee274588c --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/SYS.h @@ -0,0 +1,66 @@ +/* $NetBSD: SYS.h,v 1.2 1994/10/26 06:39:44 cgd Exp $ */ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)SYS.h 5.5 (Berkeley) 5/7/91 + */ + +#include <sys/syscall.h> + +#ifdef PROF +#define ENTRY(x) .globl _/**/x; \ + .data; 1:; .long 0; .text; .align 1; _/**/x: \ + addr $1b,tos; bsr mcount +#else +#define ENTRY(x) .globl _/**/x; .text; .align 1; _/**/x: +#endif PROF + +#define SYSCALL(x) ENTRY(x); movd SYS_/**/x, r0; svc; bcs cerror +#define RSYSCALL(x) SYSCALL(x); ret 0 +#define PSEUDO(x,y) ENTRY(x); movd SYS_/**/y, r0; svc; ret 0 +#define CALL(x,y) bsr _/**/y; adjspd -4*x + +#define ASMSTR .asciz + + .globl cerror + +#define SVC svc + +#define S_ARG0 4(sp) +#define S_ARG1 8(sp) +#define S_ARG2 12(sp) +#define S_ARG3 16(sp) + diff --git a/sys/lib/libkern/arch/ns32k/htonl.S b/sys/lib/libkern/arch/ns32k/htonl.S new file mode 100644 index 00000000000..a2110a31e98 --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/htonl.S @@ -0,0 +1,44 @@ +/* $NetBSD: htonl.S,v 1.2 1994/10/26 06:39:45 cgd Exp $ */ + +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * Copyright (c) 1992 Helsinki University of Technology + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON AND HELSINKI UNIVERSITY OF TECHNOLOGY ALLOW FREE USE + * OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND + * HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIM ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * 11-May-92 Johannes Helander (jvh) at Helsinki University of Technology + * Created. + */ + +#include <machine/asm.h> + + .text +ENTRY(htonl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/arch/ns32k/htons.S b/sys/lib/libkern/arch/ns32k/htons.S new file mode 100644 index 00000000000..bd907611691 --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/htons.S @@ -0,0 +1,42 @@ +/* $NetBSD: htons.S,v 1.2 1994/10/26 06:39:46 cgd Exp $ */ + +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * Copyright (c) 1992 Helsinki University of Technology + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON AND HELSINKI UNIVERSITY OF TECHNOLOGY ALLOW FREE USE + * OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND + * HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIM ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * 11-May-92 Johannes Helander (jvh) at Helsinki University of Technology + * Created. + */ + +#include <machine/asm.h> + + .text +ENTRY(htons) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/arch/ns32k/ntohl.S b/sys/lib/libkern/arch/ns32k/ntohl.S new file mode 100644 index 00000000000..3a45abb068f --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/ntohl.S @@ -0,0 +1,44 @@ +/* $NetBSD: ntohl.S,v 1.2 1994/10/26 06:39:47 cgd Exp $ */ + +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * Copyright (c) 1992 Helsinki University of Technology + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON AND HELSINKI UNIVERSITY OF TECHNOLOGY ALLOW FREE USE + * OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND + * HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIM ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * 11-May-92 Johannes Helander (jvh) at Helsinki University of Technology + * Created. + */ + +#include <machine/asm.h> + + .text +ENTRY(ntohl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/arch/ns32k/ntohs.S b/sys/lib/libkern/arch/ns32k/ntohs.S new file mode 100644 index 00000000000..8e09a20adca --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/ntohs.S @@ -0,0 +1,42 @@ +/* $NetBSD: ntohs.S,v 1.2 1994/10/26 06:39:48 cgd Exp $ */ + +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * Copyright (c) 1992 Helsinki University of Technology + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON AND HELSINKI UNIVERSITY OF TECHNOLOGY ALLOW FREE USE + * OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON AND + * HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIM ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * 11-May-92 Johannes Helander (jvh) at Helsinki University of Technology + * Created. + */ + +#include <machine/asm.h> + + .text +ENTRY(ntohs) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 |