aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/powerpc')
-rw-r--r--lib/libc/powerpc/Makefile.inc1
-rw-r--r--lib/libc/powerpc/SYS.h72
-rw-r--r--lib/libc/powerpc/Symbol.map28
-rw-r--r--lib/libc/powerpc/gen/Makefile.common1
-rw-r--r--lib/libc/powerpc/gen/Makefile.inc1
-rw-r--r--lib/libc/powerpc/gen/flt_rounds.c1
-rw-r--r--lib/libc/powerpc/gen/fpgetmask.c1
-rw-r--r--lib/libc/powerpc/gen/fpgetround.c1
-rw-r--r--lib/libc/powerpc/gen/fpgetsticky.c5
-rw-r--r--lib/libc/powerpc/gen/fpsetmask.c1
-rw-r--r--lib/libc/powerpc/gen/fpsetround.c1
-rw-r--r--lib/libc/powerpc/gen/makecontext.c1
-rw-r--r--lib/libc/powerpc/gen/signalcontext.c1
-rw-r--r--lib/libc/powerpc/gen/syncicache.c5
-rw-r--r--lib/libc/powerpc/static_tls.h44
-rw-r--r--lib/libc/powerpc/sys/Makefile.inc5
-rw-r--r--lib/libc/powerpc/sys/__vdso_gettc.c66
-rw-r--r--lib/libc/powerpc/sys/cerror.S66
18 files changed, 1 insertions, 300 deletions
diff --git a/lib/libc/powerpc/Makefile.inc b/lib/libc/powerpc/Makefile.inc
index 80ac23a9947c..1d1fadd21330 100644
--- a/lib/libc/powerpc/Makefile.inc
+++ b/lib/libc/powerpc/Makefile.inc
@@ -1,4 +1,3 @@
-
# Long double is 64-bits
SRCS+=machdep_ldisd.c
SYM_MAPS+=${LIBC_SRCTOP}/powerpc/Symbol.map
diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h
deleted file mode 100644
index 7fdf7c734310..000000000000
--- a/lib/libc/powerpc/SYS.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 2002 Benno Rice. All rights reserved.
- * Copyright (c) 2002 David E. O'Brien. 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.
- * 3. Neither the name of the author nor the names of any contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * 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 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.
- *
- * $NetBSD: SYS.h,v 1.8 2002/01/14 00:55:56 thorpej Exp $
- */
-
-#include <sys/syscall.h>
-#include <machine/asm.h>
-
-#define _SYSCALL(name) \
- .text; \
- .align 2; \
- li 0,(SYS_##name); \
- sc
-
-#define SYSCALL(name) \
- .text; \
- .align 2; \
-2: b CNAME(HIDENAME(cerror)); \
-ENTRY(__sys_##name); \
- WEAK_REFERENCE(__sys_##name, name); \
- WEAK_REFERENCE(__sys_##name, _##name); \
- _SYSCALL(name); \
- bso 2b
-
-#define PSEUDO(name) \
- .text; \
- .align 2; \
-ENTRY(__sys_##name); \
- WEAK_REFERENCE(__sys_##name, _##name); \
- _SYSCALL(name); \
- bnslr; \
- b CNAME(HIDENAME(cerror)); \
-END(__sys_##name)
-
-#define RSYSCALL(name) \
- .text; \
- .align 2; \
-ENTRY(__sys_##name); \
- WEAK_REFERENCE(__sys_##name, name); \
- WEAK_REFERENCE(__sys_##name, _##name); \
- _SYSCALL(name); \
- bnslr; \
- b CNAME(HIDENAME(cerror)); \
-END(__sys_##name)
diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map
index fb82bcdb27f0..ccf74c1748e4 100644
--- a/lib/libc/powerpc/Symbol.map
+++ b/lib/libc/powerpc/Symbol.map
@@ -1,39 +1,18 @@
/*
- */
-
-/*
* This only needs to contain symbols that are not listed in
* symbol maps from other parts of libc (i.e., not found in
* stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...).
*/
FBSD_1.0 {
- /* PSEUDO syscalls */
- _exit;
-
_mcount;
- _setjmp;
- _longjmp;
- fabs;
__flt_rounds;
+ brk;
fpgetmask;
fpgetround;
fpgetsticky;
fpsetmask;
fpsetround;
- __infinity;
- __nan;
- makecontext;
- setjmp;
- longjmp;
- sigsetjmp;
- siglongjmp;
- htonl;
- htons;
- ntohl;
- ntohs;
- brk;
sbrk;
- vfork;
};
FBSD_1.3 {
@@ -41,11 +20,6 @@ FBSD_1.3 {
};
FBSDprivate_1.0 {
- /* PSEUDO syscalls */
- _getlogin;
-
- _fpgetsticky;
- __makecontext;
__longjmp;
signalcontext;
__signalcontext;
diff --git a/lib/libc/powerpc/gen/Makefile.common b/lib/libc/powerpc/gen/Makefile.common
index d0d78197ca63..70aa9ea5d9c3 100644
--- a/lib/libc/powerpc/gen/Makefile.common
+++ b/lib/libc/powerpc/gen/Makefile.common
@@ -1,4 +1,3 @@
-
.PATH: ${LIBC_SRCTOP}/powerpc/gen
SRCS += _ctx_start.S eabi.S infinity.c ldexp.c makecontext.c \
diff --git a/lib/libc/powerpc/gen/Makefile.inc b/lib/libc/powerpc/gen/Makefile.inc
index efdc778e8999..502f3dc231bf 100644
--- a/lib/libc/powerpc/gen/Makefile.inc
+++ b/lib/libc/powerpc/gen/Makefile.inc
@@ -1,4 +1,3 @@
-
.include "${LIBC_SRCTOP}/powerpc/gen/Makefile.common"
SRCS += fabs.S flt_rounds.c fpgetmask.c fpgetround.c \
diff --git a/lib/libc/powerpc/gen/flt_rounds.c b/lib/libc/powerpc/gen/flt_rounds.c
index 601a42321a16..77e04694dc69 100644
--- a/lib/libc/powerpc/gen/flt_rounds.c
+++ b/lib/libc/powerpc/gen/flt_rounds.c
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <machine/float.h>
diff --git a/lib/libc/powerpc/gen/fpgetmask.c b/lib/libc/powerpc/gen/fpgetmask.c
index b4399f23cf72..6817a32bdc65 100644
--- a/lib/libc/powerpc/gen/fpgetmask.c
+++ b/lib/libc/powerpc/gen/fpgetmask.c
@@ -32,7 +32,6 @@
*
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <ieeefp.h>
diff --git a/lib/libc/powerpc/gen/fpgetround.c b/lib/libc/powerpc/gen/fpgetround.c
index f6a98d3ffe1f..b135807b613f 100644
--- a/lib/libc/powerpc/gen/fpgetround.c
+++ b/lib/libc/powerpc/gen/fpgetround.c
@@ -32,7 +32,6 @@
*
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <ieeefp.h>
diff --git a/lib/libc/powerpc/gen/fpgetsticky.c b/lib/libc/powerpc/gen/fpgetsticky.c
index a79f4062c7f9..3512c97f8cf9 100644
--- a/lib/libc/powerpc/gen/fpgetsticky.c
+++ b/lib/libc/powerpc/gen/fpgetsticky.c
@@ -31,7 +31,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include "namespace.h"
@@ -39,10 +38,6 @@
#include <ieeefp.h>
#ifndef _SOFT_FLOAT
-#ifdef __weak_alias
-__weak_alias(fpgetsticky,_fpgetsticky)
-#endif
-
fp_except_t
fpgetsticky()
{
diff --git a/lib/libc/powerpc/gen/fpsetmask.c b/lib/libc/powerpc/gen/fpsetmask.c
index eb5884aa080c..4170b385e9e4 100644
--- a/lib/libc/powerpc/gen/fpsetmask.c
+++ b/lib/libc/powerpc/gen/fpsetmask.c
@@ -32,7 +32,6 @@
*
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <ieeefp.h>
diff --git a/lib/libc/powerpc/gen/fpsetround.c b/lib/libc/powerpc/gen/fpsetround.c
index 82ec0ea354c2..2a70fd781474 100644
--- a/lib/libc/powerpc/gen/fpsetround.c
+++ b/lib/libc/powerpc/gen/fpsetround.c
@@ -32,7 +32,6 @@
*
*/
-#include <sys/cdefs.h>
#include <sys/types.h>
#include <ieeefp.h>
diff --git a/lib/libc/powerpc/gen/makecontext.c b/lib/libc/powerpc/gen/makecontext.c
index eb3cf2bb3d3b..5fbb0a96f05c 100644
--- a/lib/libc/powerpc/gen/makecontext.c
+++ b/lib/libc/powerpc/gen/makecontext.c
@@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <stdarg.h>
diff --git a/lib/libc/powerpc/gen/signalcontext.c b/lib/libc/powerpc/gen/signalcontext.c
index 253f1c8a7626..8cc9c1c94918 100644
--- a/lib/libc/powerpc/gen/signalcontext.c
+++ b/lib/libc/powerpc/gen/signalcontext.c
@@ -26,7 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/ucontext.h>
#include <signal.h>
diff --git a/lib/libc/powerpc/gen/syncicache.c b/lib/libc/powerpc/gen/syncicache.c
index 5192d1356153..6376cb0e576d 100644
--- a/lib/libc/powerpc/gen/syncicache.c
+++ b/lib/libc/powerpc/gen/syncicache.c
@@ -33,11 +33,6 @@
* $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $
*/
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
#include <sys/param.h>
#if defined(_KERNEL) || defined(_STANDALONE)
#include <sys/time.h>
diff --git a/lib/libc/powerpc/static_tls.h b/lib/libc/powerpc/static_tls.h
deleted file mode 100644
index 9ae38c71a515..000000000000
--- a/lib/libc/powerpc/static_tls.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2019 The FreeBSD Foundation
- *
- * This software was developed by Konstantin Belousov <kib@FreeBSD.org>
- * under sponsorship from the FreeBSD Foundation.
- *
- * 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.
- */
-
-#ifndef _LIBC_POWERPC_STATIC_TLS_H
-#define _LIBC_POWERPC_STATIC_TLS_H
-
-static __inline uintptr_t
-_libc_get_static_tls_base(size_t offset)
-{
- uintptr_t tlsbase;
-
- __asm __volatile("mr %0,2" : "=r"(tlsbase));
- tlsbase += offset - 0x7008;
- return (tlsbase);
-}
-
-#endif
diff --git a/lib/libc/powerpc/sys/Makefile.inc b/lib/libc/powerpc/sys/Makefile.inc
deleted file mode 100644
index 17b7b3b26111..000000000000
--- a/lib/libc/powerpc/sys/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-
-SRCS+= __vdso_gettc.c \
- sched_getcpu_gen.c
-
-MDASM+= cerror.S
diff --git a/lib/libc/powerpc/sys/__vdso_gettc.c b/lib/libc/powerpc/sys/__vdso_gettc.c
deleted file mode 100644
index 21f0f2dd87ec..000000000000
--- a/lib/libc/powerpc/sys/__vdso_gettc.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2020 Brandon Bergren <bdragon@FreeBSD.org>
- *
- * This software was developed by Konstantin Belousov
- * under sponsorship from the FreeBSD Foundation.
- *
- * 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.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/elf.h>
-#include <sys/time.h>
-#include <sys/vdso.h>
-
-#include <machine/cpufunc.h>
-#include <machine/spr.h>
-
-#include <errno.h>
-
-#include "libc_private.h"
-
-#pragma weak __vdso_gettc
-int
-__vdso_gettc(const struct vdso_timehands *th, u_int *tc)
-{
-
- if (__predict_false(th->th_algo != VDSO_TH_ALGO_PPC_TB))
- return (ENOSYS);
- /*
- * While the timebase is a 64 bit quantity, we are only interested
- * in the lower 32 bits of it.
- */
- *tc = mfspr(TBR_TBL);
-
- return (0);
-}
-
-#pragma weak __vdso_gettimekeep
-int
-__vdso_gettimekeep(struct vdso_timekeep **tk)
-{
-
- return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk)));
-}
diff --git a/lib/libc/powerpc/sys/cerror.S b/lib/libc/powerpc/sys/cerror.S
deleted file mode 100644
index 64204c5a1ddf..000000000000
--- a/lib/libc/powerpc/sys/cerror.S
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * 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.
- */
-/* $NetBSD: cerror.S,v 1.5 2000/01/27 14:58:48 kleink Exp $ */
-
-#include <machine/asm.h>
-#include "SYS.h"
-
- .globl HIDENAME(cerror)
- .globl CNAME(__error)
-
- /*
- * The __error() function is thread aware. For non-threaded
- * programs and the initial thread in threaded programs,
- * it returns a pointer to the global errno variable.
- */
-HIDENAME(cerror):
- mflr %r0
- stwu %r1,-20(%r1) /* allocate new stack frame */
- stw %r0,24(%r1) /* and save lr, r31 */
- stw %r31,12(%r1)
-#ifdef __PIC__
- stw %r30,8(%r1)
- bcl 20,31,1f
-1:
- mflr %r30
- addis %r30,%r30,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi %r30,%r30,_GLOBAL_OFFSET_TABLE_-1b@l
-#endif
- mr %r31,%r3 /* stash errval in callee-saved register */
- bl PIC_PLT(CNAME(__error))
- stw %r31,0(%r3) /* store errval into &errno */
- lwz %r0,24(%r1)
- lwz %r31,12(%r1)
-#ifdef __PIC__
- lwz %r30,8(%r1)
-#endif
- mtlr %r0
- la %r1,20(%r1)
- li %r3,-1
- li %r4,-1
- blr /* return to callers caller */
-
- .section .note.GNU-stack,"",%progbits