Download raw body.
Remove unused hton[ls] functions from libkern
remove unused hton[ls] functions from libkern
These have been superseded by inlines from endian.h.
Just to be sure, I built:
- amd64: make release
- i386: GENERIC, GENERIC.MP, RAMDISK, RAMDISK_CD kernels
- arm64: GENERIC, GENERIC.MP, RAMDISK kernels
ok?
M sys/conf/files | 0+ 2-
D sys/lib/libkern/arch/alpha/htonl.S | 0+ 1-
D sys/lib/libkern/arch/alpha/htons.S | 0+ 1-
D sys/lib/libkern/arch/amd64/htonl.S | 0+ 53-
D sys/lib/libkern/arch/amd64/htons.S | 0+ 53-
D sys/lib/libkern/arch/arm/htonl.S | 0+ 43-
D sys/lib/libkern/arch/arm/htons.S | 0+ 42-
D sys/lib/libkern/arch/i386/htonl.S | 0+ 47-
D sys/lib/libkern/arch/i386/htons.S | 0+ 45-
D sys/lib/libkern/arch/mips64/htonl.S | 0+ 59-
D sys/lib/libkern/arch/mips64/htons.S | 0+ 55-
D sys/lib/libkern/arch/sparc64/htonl.S | 0+ 46-
D sys/lib/libkern/arch/sparc64/htons.S | 0+ 45-
D sys/lib/libkern/htonl.c | 0+ 23-
D sys/lib/libkern/htons.c | 0+ 23-
15 files changed, 0 insertions(+), 538 deletions(-)
diff 0ff3951c8041dba7ab13a22afe8248411c273a86 740c6a054bd922d8da6db2ca658124660b8aa955
commit - 0ff3951c8041dba7ab13a22afe8248411c273a86
commit + 740c6a054bd922d8da6db2ca658124660b8aa955
blob - fd76e9934e927e2ee5ef69beb2c755e593aed971
blob + b98e5eb0133ee4cf807345c60328aea39dc248ac
--- sys/conf/files
+++ sys/conf/files
@@ -1081,8 +1081,6 @@ file lib/libkern/arch/${MACHINE_ARCH}/strnlen.S | lib/
file lib/libkern/arch/${MACHINE_ARCH}/strnstr.S | lib/libkern/strnstr.c
file lib/libkern/arch/${MACHINE_ARCH}/scanc.S | lib/libkern/scanc.c
file lib/libkern/arch/${MACHINE_ARCH}/skpc.S | lib/libkern/skpc.c
-file lib/libkern/arch/${MACHINE_ARCH}/htonl.S | lib/libkern/htonl.c
-file lib/libkern/arch/${MACHINE_ARCH}/htons.S | lib/libkern/htons.c
file lib/libkern/arch/${MACHINE_ARCH}/strncasecmp.S | lib/libkern/strncasecmp.c
file lib/libz/adler32.c ppp_deflate | ipsec | crypto | ddb |
blob - b34338a26e605d9036281ef498d74c63a49d7f12 (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/alpha/htonl.S
+++ /dev/null
@@ -1 +0,0 @@
-/* No code here since kernel implements this itself */
blob - b34338a26e605d9036281ef498d74c63a49d7f12 (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/alpha/htons.S
+++ /dev/null
@@ -1 +0,0 @@
-/* No code here since kernel implements this itself */
blob - cce7babf4be45e8e49ae768105eeea0f6813e74f (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/amd64/htonl.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $NetBSD: byte_swap_4.S,v 1.1 2001/06/19 00:22:45 fvdl 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.
- *
- * from: @(#)htonl.s 5.3 (Berkeley) 12/17/90
- */
-
-#include <machine/asm.h>
-
-STRONG_ALIAS(ntohl, htonl)
-STRONG_ALIAS(bswap32, htonl)
-
-ENTRY(htonl)
- RETGUARD_SETUP(htonl, r11)
- movl %edi,%eax
- bswap %eax
- RETGUARD_CHECK(htonl, r11)
- ret
- lfence
-END(htonl)
blob - 9cc236e9a980b54e9a3d6c2ace3a4192f8904d56 (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/amd64/htons.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $NetBSD: byte_swap_2.S,v 1.1 2001/06/19 00:22:45 fvdl 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.
- *
- * from: @(#)htons.s 5.2 (Berkeley) 12/17/90
- */
-
-#include <machine/asm.h>
-
-STRONG_ALIAS(ntohs, htons)
-STRONG_ALIAS(bswap16, htons)
-
-ENTRY(htons)
- RETGUARD_SETUP(htons, r11)
- movl %edi,%eax
- xchgb %ah,%al
- RETGUARD_CHECK(htons, r11)
- ret
- lfence
-END(htons)
blob - d223285a1bfac8c9fca83ca058ccdf8a21c719c5 (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/arm/htonl.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/* $OpenBSD: htonl.S,v 1.4 2022/12/08 01:25:46 guenther Exp $ */
-/* $NetBSD: byte_swap_4.S,v 1.1 2000/12/29 20:51:57 bjh21 Exp $ */
-
-/*-
- * Copyright (c) 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Neil A. Carson
- *
- * 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 <machine/asm.h>
-
-_ENTRY(htonl)
-_ENTRY(ntohl)
-_ENTRY(bswap32)
-_PROF_PROLOGUE
- eor r1, r0, r0, ror #16
- bic r1, r1, #0x00FF0000
- mov r0, r0, ror #8
- eor r0, r0, r1, lsr #8
- mov pc, lr
blob - 0593286c523116af68272b7e631636cffbaccdda (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/arm/htons.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $OpenBSD: htons.S,v 1.4 2022/12/08 01:25:46 guenther Exp $ */
-/* $NetBSD: byte_swap_2.S,v 1.1.20.1 2002/07/02 06:50:59 lukem Exp $ */
-
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Charles M. Hannum.
- *
- * 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 <machine/asm.h>
-
-_ENTRY(htons)
-_ENTRY(ntohs)
-_ENTRY(bswap16)
-_PROF_PROLOGUE
- and r1, r0, #0xff
- mov r0, r0, lsr #8
- orr r0, r0, r1, lsl #8
- mov pc, lr
blob - 1d44d676ca095d4952dc848df41f686537bfdc5b (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/i386/htonl.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $OpenBSD: htonl.S,v 1.4 2007/11/25 18:25:35 deraadt 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. 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: @(#)htonl.s 5.3 (Berkeley) 12/17/90
- */
-
-#include <machine/asm.h>
-
-/* netorder = htonl(hostorder) AND hostorder = ntohl(netorder) */
-ENTRY(ntohl)
-ENTRY(htonl)
-ENTRY(swap32)
- movl 4(%esp),%eax
- rorw $8,%ax
- roll $16,%eax
- rorw $8,%ax
- ret
blob - d563ce8e64222c11acb3aa61b688cd6530b3710b (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/i386/htons.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $OpenBSD: htons.S,v 1.4 2007/11/25 18:25:35 deraadt 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. 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: @(#)htons.s 5.2 (Berkeley) 12/17/90
- */
-
-#include <machine/asm.h>
-
-/* netorder = htons(hostorder) AND hostorder = ntohs(netorder) */
-ENTRY(htons)
-ENTRY(ntohs)
-ENTRY(swap16)
- movzwl 4(%esp),%eax
- rorw $8,%ax
- ret
blob - 13c1d7024c963c2403c7e94fc89400fc0d31c074 (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/mips64/htonl.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $OpenBSD: htonl.S,v 1.4 2009/12/12 20:03:54 miod Exp $ */
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ralph Campbell.
- *
- * 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"
-
-
-/*
- * netorder = htonl(hostorder)
- * hostorder = ntohl(netorder)
- */
-LEAF(htonl, 0) # a0 = 0x11223344, return 0x44332211
-ALEAF(ntohl)
-#ifdef __MIPSEL__
- .set noreorder
- srl v1, a0, 24 # v1 = 0x00000011
- sll v0, a0, 24 # v0 = 0x44000000
- or v0, v0, v1
- and v1, a0, 0xff00
- sll v1, v1, 8 # v1 = 0x00330000
- or v0, v0, v1
- srl v1, a0, 8
- and v1, v1, 0xff00 # v1 = 0x00002200
- j ra
- or v0, v0, v1
-#else
- j ra
- move v0, a0
-#endif
-END(htonl)
blob - 1d956a324b0b61e2f5cda917764f749337d4f24a (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/mips64/htons.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $OpenBSD: htons.S,v 1.4 2009/12/12 20:03:54 miod Exp $ */
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ralph Campbell.
- *
- * 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"
-
-
-/*
- * netorder = htons(hostorder)
- * hostorder = ntohs(netorder)
- */
-LEAF(htons, 0)
-ALEAF(ntohs)
-#ifdef __MIPSEL__
- .set noreorder
- srl v0, a0, 8
- and v0, v0, 0xff
- sll v1, a0, 8
- and v1, v1, 0xff00
- j ra
- or v0, v0, v1
-#else
- j ra
- move v0, a0
-#endif
-END(htons)
blob - 71fbd5145dbc5440ce8b61b13406a5a1f9ac39f0 (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/sparc64/htonl.S
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $OpenBSD: htonl.S,v 1.5 2019/11/05 08:16:43 mpi Exp $ */
-/* $NetBSD: htonl.S,v 1.1.1.1 1998/06/20 05:18:14 eeh Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- *
- * Header: htonl.s,v 1.1 92/06/25 12:47:05 torek Exp
- */
-
-/* netorder = htonl(hostorder) */
-
-#include "DEFS.h"
-
-ENTRY(htonl)
- retl
- sra %o0, 0, %o0 ! sign extend
-END(htonl)
blob - fc4375b5e2c9c18598aae30f9fc47e1fc18b509d (mode 644)
blob + /dev/null
--- sys/lib/libkern/arch/sparc64/htons.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $OpenBSD: htons.S,v 1.5 2019/11/05 08:16:43 mpi Exp $ */
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * 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.
- *
- * Header: htons.s,v 1.1 92/06/25 12:47:05 torek Exp
- */
-
-/* netorder = htons(hostorder) */
-
-#include "DEFS.h"
-
-ENTRY(htons)
- sethi %hi(0xffff0000), %o1
- retl
- andn %o0, %o1, %o0
-END(htons)
blob - 6929e7e32acb4ccc1fe27ec90267b4647b7c8fa6 (mode 644)
blob + /dev/null
--- sys/lib/libkern/htonl.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* $OpenBSD: htonl.c,v 1.9 2014/12/20 18:15:29 miod Exp $ */
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-#include <sys/types.h>
-#include <sys/endian.h>
-
-#undef htonl
-
-u_int32_t htonl(u_int32_t);
-
-u_int32_t
-htonl(u_int32_t x)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char *s = (u_char *)&x;
- return (u_int32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]);
-#else
- return x;
-#endif
-}
blob - 714eb37c1f021debcf9509904ff686c290854044 (mode 644)
blob + /dev/null
--- sys/lib/libkern/htons.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* $OpenBSD: htons.c,v 1.9 2014/12/20 18:15:29 miod Exp $ */
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-#include <sys/types.h>
-#include <sys/endian.h>
-
-#undef htons
-
-u_int16_t htons(u_int16_t);
-
-u_int16_t
-htons(u_int16_t x)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_char *s = (u_char *) &x;
- return (u_int16_t)(s[0] << 8 | s[1]);
-#else
- return x;
-#endif
-}
--
Christian "naddy" Weisgerber naddy@mips.inka.de
Remove unused hton[ls] functions from libkern