diff --git a/lib/libc/arch/ns32k/net/htonl.S b/lib/libc/arch/ns32k/net/htonl.S new file mode 100644 index 000000000000..b494b7dc6790 --- /dev/null +++ b/lib/libc/arch/ns32k/net/htonl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: htonl.S,v 1.1 1993/12/05 01:36:52 cgd Exp $ + */ + +#include + + .text +ENTRY(htonl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/ns32k/net/htons.S b/lib/libc/arch/ns32k/net/htons.S new file mode 100644 index 000000000000..2e8f6f68f10e --- /dev/null +++ b/lib/libc/arch/ns32k/net/htons.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: htons.S,v 1.1 1993/12/05 01:36:56 cgd Exp $ + */ + +#include + + .text +ENTRY(htons) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/ns32k/net/ntohl.S b/lib/libc/arch/ns32k/net/ntohl.S new file mode 100644 index 000000000000..786f4bc20c6c --- /dev/null +++ b/lib/libc/arch/ns32k/net/ntohl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: ntohl.S,v 1.1 1993/12/05 01:36:58 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/ns32k/net/ntohs.S b/lib/libc/arch/ns32k/net/ntohs.S new file mode 100644 index 000000000000..da569526f232 --- /dev/null +++ b/lib/libc/arch/ns32k/net/ntohs.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: ntohs.S,v 1.1 1993/12/05 01:36:59 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohs) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/pc532/net/htonl.S b/lib/libc/arch/pc532/net/htonl.S new file mode 100644 index 000000000000..b494b7dc6790 --- /dev/null +++ b/lib/libc/arch/pc532/net/htonl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: htonl.S,v 1.1 1993/12/05 01:36:52 cgd Exp $ + */ + +#include + + .text +ENTRY(htonl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/pc532/net/htons.S b/lib/libc/arch/pc532/net/htons.S new file mode 100644 index 000000000000..2e8f6f68f10e --- /dev/null +++ b/lib/libc/arch/pc532/net/htons.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: htons.S,v 1.1 1993/12/05 01:36:56 cgd Exp $ + */ + +#include + + .text +ENTRY(htons) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/pc532/net/ntohl.S b/lib/libc/arch/pc532/net/ntohl.S new file mode 100644 index 000000000000..786f4bc20c6c --- /dev/null +++ b/lib/libc/arch/pc532/net/ntohl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: ntohl.S,v 1.1 1993/12/05 01:36:58 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/arch/pc532/net/ntohs.S b/lib/libc/arch/pc532/net/ntohs.S new file mode 100644 index 000000000000..da569526f232 --- /dev/null +++ b/lib/libc/arch/pc532/net/ntohs.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: ntohs.S,v 1.1 1993/12/05 01:36:59 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohs) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index 26d1724a2287..22104a8fddba 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -1,5 +1,5 @@ # from: @(#)Makefile.inc 5.3 (Berkeley) 2/21/91 -# $Id: Makefile.inc,v 1.8 1993/12/04 02:36:36 cgd Exp $ +# $Id: Makefile.inc,v 1.9 1993/12/05 01:36:46 cgd Exp $ # net sources .PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/net ${.CURDIR}/net @@ -18,7 +18,7 @@ SRCS+= htonl.S htons.S ntohl.S ntohs.S .elif (${MACHINE_ARCH} == "i386") SRCS+= htonl.S htons.S ntohl.S ntohs.S .elif (${MACHINE_ARCH} == "pc532") -SRCS+= ntoh.S +SRCS+= htonl.S htons.S ntohl.S ntohs.S .elif (${MACHINE_ARCH} == "tahoe") SRCS+= htonl.S htons.S ntohl.S ntohs.S .elif (${MACHINE_ARCH} == "vax") diff --git a/sys/lib/libkern/arch/ns32k/htonl.S b/sys/lib/libkern/arch/ns32k/htonl.S new file mode 100644 index 000000000000..b494b7dc6790 --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/htonl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: htonl.S,v 1.1 1993/12/05 01:36:52 cgd Exp $ + */ + +#include + + .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 000000000000..2e8f6f68f10e --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/htons.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: htons.S,v 1.1 1993/12/05 01:36:56 cgd Exp $ + */ + +#include + + .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 000000000000..786f4bc20c6c --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/ntohl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: ntohl.S,v 1.1 1993/12/05 01:36:58 cgd Exp $ + */ + +#include + + .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 000000000000..da569526f232 --- /dev/null +++ b/sys/lib/libkern/arch/ns32k/ntohs.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: ntohs.S,v 1.1 1993/12/05 01:36:59 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohs) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/ns32k/htonl.S b/sys/lib/libkern/ns32k/htonl.S new file mode 100644 index 000000000000..b494b7dc6790 --- /dev/null +++ b/sys/lib/libkern/ns32k/htonl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: htonl.S,v 1.1 1993/12/05 01:36:52 cgd Exp $ + */ + +#include + + .text +ENTRY(htonl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/ns32k/htons.S b/sys/lib/libkern/ns32k/htons.S new file mode 100644 index 000000000000..2e8f6f68f10e --- /dev/null +++ b/sys/lib/libkern/ns32k/htons.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: htons.S,v 1.1 1993/12/05 01:36:56 cgd Exp $ + */ + +#include + + .text +ENTRY(htons) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/ns32k/ntohl.S b/sys/lib/libkern/ns32k/ntohl.S new file mode 100644 index 000000000000..786f4bc20c6c --- /dev/null +++ b/sys/lib/libkern/ns32k/ntohl.S @@ -0,0 +1,44 @@ +/* + * 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. + * + * $Id: ntohl.S,v 1.1 1993/12/05 01:36:58 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohl) + movd S_ARG0,r0 + rotw 8,r0 + rotd 16,r0 + rotw 8,r0 + ret 0 diff --git a/sys/lib/libkern/ns32k/ntohs.S b/sys/lib/libkern/ns32k/ntohs.S new file mode 100644 index 000000000000..da569526f232 --- /dev/null +++ b/sys/lib/libkern/ns32k/ntohs.S @@ -0,0 +1,42 @@ +/* + * 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. + * + * $Id: ntohs.S,v 1.1 1993/12/05 01:36:59 cgd Exp $ + */ + +#include + + .text +ENTRY(ntohs) + movzwd S_ARG0,r0 + rotw 8,r0 + ret 0