about summary refs log tree commit diff
path: root/sysdeps/powerpc/fpu_control.h
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/fpu_control.h
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/fpu_control.h')
-rw-r--r--sysdeps/powerpc/fpu_control.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/sysdeps/powerpc/fpu_control.h b/sysdeps/powerpc/fpu_control.h
index e0c5cf6534..e88d81640d 100644
--- a/sysdeps/powerpc/fpu_control.h
+++ b/sysdeps/powerpc/fpu_control.h
@@ -19,6 +19,10 @@
 #ifndef _FPU_CONTROL_H
 #define _FPU_CONTROL_H
 
+#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
+# error "SPE/e500 is no longer supported"
+#endif
+
 #ifdef _SOFT_FLOAT
 
 # define _FPU_RESERVED 0xffffffff
@@ -28,41 +32,6 @@ typedef unsigned int fpu_control_t;
 # define _FPU_SETCW(cw) (void) (cw)
 extern fpu_control_t __fpu_control;
 
-#elif defined __NO_FPRS__ /* e500 */
-
-/* rounding control */
-# define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
-# define _FPU_RC_DOWN    0x03
-# define _FPU_RC_UP      0x02
-# define _FPU_RC_ZERO    0x01
-
-/* masking of interrupts */
-# define _FPU_MASK_ZM  0x10 /* zero divide */
-# define _FPU_MASK_OM  0x04 /* overflow */
-# define _FPU_MASK_UM  0x08 /* underflow */
-# define _FPU_MASK_XM  0x40 /* inexact */
-# define _FPU_MASK_IM  0x20 /* invalid operation */
-
-# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */
-
-/* Correct IEEE semantics require traps to be enabled at the hardware
-   level; the kernel then does the emulation and determines whether
-   generation of signals from those traps was enabled using prctl.  */
-# define _FPU_DEFAULT  0x0000003c /* Default value.  */
-# define _FPU_IEEE     _FPU_DEFAULT
-
-/* Type of the control word.  */
-typedef unsigned int fpu_control_t;
-
-/* Macros for accessing the hardware control word.  */
-# define _FPU_GETCW(cw) \
-  __asm__ volatile ("mfspefscr %0" : "=r" (cw))
-# define _FPU_SETCW(cw) \
-  __asm__ volatile ("mtspefscr %0" : : "r" (cw))
-
-/* Default control word set at startup.  */
-extern fpu_control_t __fpu_control;
-
 #else /* PowerPC 6xx floating-point.  */
 
 /* rounding control */