Fix PR bootstrap/100327 (_divkf3.c) on PowerPC.

This patch fixes the PowerPC _divkf3.c module to use the appropriate
FLT128 constants if long double is not IEEE 128-bit.

I have tested this patch by doing a bootstrap on a little endian power9
system running Linux.  Can I check this into the trunk?

gcc/
2021-04-29  Michael Meissner  <meiss...@linux.ibm.com>

        PR bootstrap/100327
        * config/rs6000/_divkf3.c (RBIG, RMIN, RMIN2, RMINSCAL): Use the
        appropriate FLT128 constant if long double is not IEEE 128-bit.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797
--- /home/meissner/tmp/gcc-tmp/dDj7PV__divkc3.c 2021-04-29 10:32:37.669452599 
-0500
+++ libgcc/config/rs6000/_divkc3.c      2021-04-29 10:27:10.388470401 -0500
@@ -38,10 +38,10 @@ see the files COPYING3 and COPYING.RUNTI
 #endif
 
 #ifndef __LONG_DOUBLE_IEEE128__
-#define RBIG   (__LIBGCC_KF_MAX__ / 2)
-#define RMIN   (__LIBGCC_KF_MIN__)
-#define RMIN2  (__LIBGCC_KF_EPSILON__)
-#define RMINSCAL (1 / __LIBGCC_KF_EPSILON__)
+#define RBIG   (__FLT128_MAX__ / 2)
+#define RMIN   (__FLT128_MIN__)
+#define RMIN2  (__FLT128_EPSILON__)
+#define RMINSCAL (1 / __FLT128_EPSILON__)
 #define RMAX2  (RBIG * RMIN2)
 #else
 #define RBIG   (__LIBGCC_TF_MAX__ / 2)

Reply via email to