https://gcc.gnu.org/g:fc055e35f364a98fa950f633b6a9616a19612a55

commit fc055e35f364a98fa950f633b6a9616a19612a55
Author: Michael Meissner <[email protected]>
Date:   Thu Nov 6 00:18:34 2025 -0500

    Revert changes

Diff:
---
 libgcc/config.host                 |  4 ---
 libgcc/config/rs6000/sfp-machine.h | 50 -------------------------------
 libgcc/config/rs6000/t-float16     | 61 --------------------------------------
 libgcc/configure                   | 23 --------------
 libgcc/configure.ac                | 11 -------
 5 files changed, 149 deletions(-)

diff --git a/libgcc/config.host b/libgcc/config.host
index e1b9cd055be8..82ea1772f516 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1302,10 +1302,6 @@ powerpc*-*-linux*)
                tmake_file="${tmake_file} rs6000/t-float128-p10-hw"
        fi
 
-       if test $libgcc_cv_powerpc_float16 = yes; then
-               tmake_file="${tmake_file} rs6000/t-float16"
-       fi
-
        extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o"
        md_unwind_header=rs6000/linux-unwind.h
        ;;
diff --git a/libgcc/config/rs6000/sfp-machine.h 
b/libgcc/config/rs6000/sfp-machine.h
index 642d2fc4f215..f0ede0e042a3 100644
--- a/libgcc/config/rs6000/sfp-machine.h
+++ b/libgcc/config/rs6000/sfp-machine.h
@@ -22,9 +22,6 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
 #define _FP_I_TYPE             int
 #endif /* 32-bits  */
 
-#define _FP_NANFRAC_H           _FP_QNANBIT_H
-#define _FP_NANFRAC_B           _FP_QNANBIT_B
-
 /* The type of the result of a floating point comparison.  This must
    match `__libgcc_cmp_return__' in GCC for the target.  */
 typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
@@ -65,8 +62,6 @@ typedef int __gcc_CMPtype __attribute__ ((mode 
(__libgcc_cmp_return__)));
 #define _FP_NANFRAC_Q          ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
 #endif
 
-#define _FP_NANSIGN_H          1
-#define _FP_NANSIGN_B          1
 #define _FP_NANSIGN_S          0
 #define _FP_NANSIGN_D          0
 #define _FP_NANSIGN_Q          0
@@ -166,48 +161,3 @@ void __sfp_handle_exceptions (int);
 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
 # define _strong_alias(name, aliasname) \
   extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-
-/* Add prototypes for the HFmode and BFmode functions.  */
-typedef double DFtype2;
-typedef float SFtype2;
-typedef int DItype2 __attribute__ ((mode (DI)));
-typedef unsigned int UDItype2 __attribute__ ((mode (DI)));
-typedef int SItype2 __attribute__ ((mode (SI)));
-typedef unsigned int USItype2 __attribute__ ((mode (SI)));
-
-#ifdef __FLOAT16__
-typedef float HFtype2 __attribute__ ((mode (HF)));
-
-extern CMPtype __eqhf2 (HFtype2, HFtype2);
-extern DFtype2 __extendhfdf2 (HFtype2);
-extern SFtype2 __extendhfsf2 (HFtype2);
-extern DItype2 __fixhfdi (HFtype2);
-extern SItype2 __fixhfsi (HFtype2);
-extern UDItype2 __fixunshfdi (HFtype2);
-extern USItype2 __fixunshfsi (HFtype2);
-extern HFtype2 __floatdihf (DItype2);
-extern HFtype2 __floatsihf (SItype2);
-extern HFtype2 __floatundihf (UDItype2);
-extern HFtype2 __floatunsihf (USItype2);
-extern HFtype2 __truncdfhf2 (DFtype2);
-extern HFtype2 __truncsfhf2 (SFtype2);
-#endif
-
-#ifdef __BFLOAT16__
-typedef float BFtype2 __attribute__ ((mode (BF)));
-
-extern SFtype2 __extendbfsf2 (BFtype2);
-extern BFtype2 __floatdibf (DItype2);
-extern BFtype2 __floatsibf (SItype2);
-extern BFtype2 __floatundibf (UDItype2);
-extern BFtype2 __floatunsibf (USItype2);
-extern BFtype2 __truncdfbf2 (DFtype2);
-extern BFtype2 __truncsfbf2 (SFtype2);
-#endif
-
-#if defined(__FLOAT16__) && defined(__BFLOAT16__)
-extern HFtype2 __truncbfhf2 (BFtype2);
-extern BFtype2 __trunchfbf2 (HFtype2);
-#endif
-
-
diff --git a/libgcc/config/rs6000/t-float16 b/libgcc/config/rs6000/t-float16
deleted file mode 100644
index 9a0e8cd8963c..000000000000
--- a/libgcc/config/rs6000/t-float16
+++ /dev/null
@@ -1,61 +0,0 @@
-# _Float16 library support
-
-fp16_funcs     = eqhf2 extendhfdf2 extendhfsf2 \
-                 fixhfdi  fixhfsi fixunshfdi fixunshfsi \
-                 floatdihf floatsihf floatundihf floatunsihf \
-                 truncdfhf2 truncsfhf2
-
-fp16_src       = $(addprefix $(srcdir)/soft-fp/,$(addsuffix .c,$(fp16_funcs)))
-fp16_obj       = $(addsuffix $(objext),$(fp16_funcs))
-
-FP16_CFLAGS    = -mfloat16 -Wno-psabi \
-                 -I$(srcdir)/soft-fp -I$(srcdir)/config/rs6000
-
-$(fp16_obj)    : INTERNAL_CFLAGS += $(FP16_CFLAGS)
-
-# __bfloat16 library support
-
-bfp16_funcs    = extendbfsf2 floatdibf floatsibf floatundibf floatunsibf \
-                 truncdfbf2 truncsfbf2
-
-bfp16_src      = $(addprefix $(srcdir)/soft-fp/,$(addsuffix .c,$(bfp16_funcs)))
-bfp16_obj      = $(addsuffix $(objext),$(bfp16_funcs))
-
-$(bfp16_obj)   : INTERNAL_CFLAGS += $(FP16_CFLAGS)
-
-# Conversion between __bfloat16 and _Float16
-
-both_fp16_funcs         = truncbfhf2 trunchfbf2
-both_fp16_src   = $(addprefix $(srcdir)/soft-fp/,$(addsuffix 
.c,$(both_fp16_funcs)))
-both_fp16_obj   = $(addsuffix $(objext),$(both_fp16_funcs))
-
-$(both_fp16_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS)
-
-# For now, only put it in the static library
-# LIB2ADD      += $(fp16_src) $(bfp16_src) $(both_fp16_src)
-
-LIB2ADD_ST     += $(fp16_src) $(bfp16_src) $(both_fp16_src)
-
-.PHONY: test-float16 clean-float16
-
-test-float16:
-       @echo "fp16_src:"; \
-       for x in $(fp16_src); do echo "    $$x"; done; \
-       echo; \
-       echo "bfp16_src:"; \
-       for x in $(bfp16_src); do echo "    $$x"; done; \
-       echo; \
-       echo "both_fp16_src:"; \
-       for x in $(both_fp16_src); do echo "    $$x"; done; \
-       echo; \
-       echo "fp16_obj:"; \
-       for x in $(fp16_obj); do echo "    $$x"; done; \
-       echo; \
-       echo "bfp16_obj:"; \
-       for x in $(bfp16_obj); do echo "    $$x"; done; \
-       echo; \
-       echo "both_fp16_obj:"; \
-       for x in $(bfp16_obj); do echo "    $$x"; done;
-
-clean-float16:
-       @$(MULTICLEAN) multi-clean DO=clean-float16
diff --git a/libgcc/configure b/libgcc/configure
index d53bcf5a1277..d5e80d227ff6 100755
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -5188,8 +5188,6 @@ case ${host} in
 # check if we have VSX (ISA 2.06) support to build the software libraries, and
 # whether the assembler can handle xsaddqp for hardware support.  Also check if
 # a new glibc is being used so that __builtin_cpu_supports can be used.
-#
-# Add float16 support also
 powerpc*-*-linux*)
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128"
@@ -5284,27 +5282,6 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$libgcc_cv_powerpc_3_1_float128_hw" >&5
 $as_echo "$libgcc_cv_powerpc_3_1_float128_hw" >&6; }
   CFLAGS="$saved_CFLAGS"
-
-  CFLAGS="$CFLAGS -mfloat16 -Wno-psabi"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the PowerPC can 
build the _Float16 libraries" >&5
-$as_echo_n "checking whether the PowerPC can build the _Float16 libraries... " 
>&6; }
-if ${libgcc_cv_powerpc_float16+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-_Float16 addf16 (_Float16 a, _Float16 b) { return a + b; }
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  libgcc_cv_powerpc_float16=yes
-else
-  libgcc_cv_powerpc_float16=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float16" 
>&5
-$as_echo "$libgcc_cv_powerpc_float16" >&6; }
-  CFLAGS="$saved_CFLAGS"
 esac
 
 # Collect host-machine-specific information.
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 0e95dc97c867..65cd3c6aa1a5 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -407,8 +407,6 @@ case ${host} in
 # check if we have VSX (ISA 2.06) support to build the software libraries, and
 # whether the assembler can handle xsaddqp for hardware support.  Also check if
 # a new glibc is being used so that __builtin_cpu_supports can be used.
-#
-# Add float16 support also
 powerpc*-*-linux*)
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128"
@@ -467,15 +465,6 @@ powerpc*-*-linux*)
     [libgcc_cv_powerpc_3_1_float128_hw=yes],
     [libgcc_cv_powerpc_3_1_float128_hw=no])])
   CFLAGS="$saved_CFLAGS"
-
-  CFLAGS="$CFLAGS -mfloat16 -Wno-psabi"
-  AC_CACHE_CHECK([whether the PowerPC can build the _Float16 libraries],
-                [libgcc_cv_powerpc_float16],
-                [AC_COMPILE_IFELSE(
-    [AC_LANG_SOURCE([_Float16 addf16 (_Float16 a, _Float16 b) { return a + b; 
}])],
-    [libgcc_cv_powerpc_float16=yes],
-    [libgcc_cv_powerpc_float16=no])])
-  CFLAGS="$saved_CFLAGS"
 esac
 
 # Collect host-machine-specific information.

Reply via email to