about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2019-05-16 13:34:27 -0400
committerZack Weinberg <zackw@panix.com>2019-05-22 10:05:40 -0400
commita053e878494080f7070cf92890e546057236c9c9 (patch)
treec906e6ed1cb5ffd3f7ea460d521bd8317e8d855b /sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c
parent46ae07324b1cd50fbf8f37a076d6babcfca7c510 (diff)
downloadglibc-a053e878494080f7070cf92890e546057236c9c9.tar.gz
glibc-a053e878494080f7070cf92890e546057236c9c9.tar.xz
glibc-a053e878494080f7070cf92890e546057236c9c9.zip
Remove support for PowerPC SPE extension (powerpc*-*-*gnuspe*).
GCC 9 dropped support for the SPE extensions to PowerPC, which means
powerpc*-*-*gnuspe* configurations are no longer buildable with that
compiler.  This ISA extension was peculiar to the “e500” line of
embedded PowerPC chips, which, as far as I can tell, are no longer
being manufactured, so I think we should follow suit.

This patch was developed by grepping for “e500”, “__SPE__”, and
“__NO_FPRS__”, and may not eliminate every vestige of SPE support.
Most uses of __NO_FPRS__ are left alone, as they are relevant to
normal embedded PowerPC with soft-float.

        * sysdeps/powerpc/preconfigure: Error out on powerpc-*-*gnuspe*
        host type.
        * scripts/build-many-glibcs.py: Remove powerpc-*-linux-gnuspe
        and powerpc-*-linux-gnuspe-e500v1 from list of build configurations.

        * sysdeps/powerpc/powerpc32/e500: Recursively delete.
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/e500: Recursively delete.
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/context-e500.h:
        Delete.

        * sysdeps/powerpc/fpu_control.h: Remove SPE variant.
        Issue an #error if used with a compiler in SPE-float mode.
        * sysdeps/powerpc/powerpc32/__longjmp_common.S
        * sysdeps/powerpc/powerpc32/setjmp_common.S
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S:
        Remove code to preserve SPE register state.

        * sysdeps/unix/sysv/linux/powerpc/elision-lock.c
        * sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
        * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
        Remove __SPE__ ifndefs.
Diffstat (limited to 'sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c')
-rw-r--r--sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c
deleted file mode 100644
index 25b55f4b43..0000000000
--- a/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Store current floating-point environment and clear exceptions.
-   e500 version.
-   Copyright (C) 2004-2019 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fenv_libc.h>
-#include <sysdep.h>
-#include <sys/prctl.h>
-
-int
-__feholdexcept (fenv_t *envp)
-{
-  fenv_union_t u;
-  INTERNAL_SYSCALL_DECL (err);
-  int r;
-
-  /* Get the current state.  */
-  r = INTERNAL_SYSCALL (prctl, err, 2, PR_GET_FPEXC, &u.l[0]);
-  if (INTERNAL_SYSCALL_ERROR_P (r, err))
-    return -1;
-
-  u.l[1] = fegetenv_register ();
-  *envp = u.fenv;
-
-  /* Clear everything except for the rounding mode and trapping to the
-     kernel.  */
-  u.l[0] &= ~(PR_FP_EXC_DIV
-	      | PR_FP_EXC_OVF
-	      | PR_FP_EXC_UND
-	      | PR_FP_EXC_RES
-	      | PR_FP_EXC_INV);
-  u.l[1] &= SPEFSCR_FRMC | (SPEFSCR_ALL_EXCEPT_ENABLE & ~SPEFSCR_FINXE);
-
-  /* Put the new state in effect.  */
-  fesetenv_register (u.l[1]);
-  r = INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC,
-			u.l[0] | PR_FP_EXC_SW_ENABLE);
-  if (INTERNAL_SYSCALL_ERROR_P (r, err))
-    return -1;
-
-  return 0;
-}
-libm_hidden_def (__feholdexcept)
-weak_alias (__feholdexcept, feholdexcept)
-libm_hidden_weak (feholdexcept)