Delete changes meant for a private branch.
authorMichael Meissner <Michael Meissner meissner@linux.ibm.com>
Tue, 5 May 2020 18:01:48 +0000 (14:01 -0400)
committerMichael Meissner <Michael Meissner meissner@linux.ibm.com>
Tue, 5 May 2020 18:03:30 +0000 (14:03 -0400)
2020-05-05  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000-builtin.def: Delete changes meant for a
private branch.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000-call.c: Likewise.
* gcc/config/rs6000/rs6000.c: Likewise.

2020-05-05  Michael Meissner  <meissner@linux.ibm.com>

* gcc.dg/nextafter-2.c: Delete changes meant for a private branch.
* gcc.target/powerpc/pr70117.c: Likewise.

2020-05-05  Michael Meissner  <meissner@linux.ibm.com>

* config.host: Delete changes meant for a private branch.
* config/rs6000/t-float128: Likewise.
* configure.ac: Likewise.
* configure: Likewise.

13 files changed:
gcc/ChangeLog
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/nextafter-2.c
gcc/testsuite/gcc.target/powerpc/pr70117.c
libgcc/ChangeLog
libgcc/config.host
libgcc/config/rs6000/t-float128
libgcc/configure
libgcc/configure.ac

index 995f0aa4d1aadbfc32d516160a36fc826ebd90a0..15ac1c3c4df634ec1ef2f9d7ef7a06c04ec3fafc 100644 (file)
@@ -1,3 +1,11 @@
+2020-05-05  Michael Meissner  <meissner@linux.ibm.com>
+
+       * config/rs6000/rs6000-builtin.def: Delete changes meant for a
+       private branch.
+       * config/rs6000/rs6000-c.c: Likewise.
+       * config/rs6000/rs6000-call.c: Likewise.
+       * gcc/config/rs6000/rs6000.c: Likewise.
+
 2020-05-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
        * config/rtems.h (RTEMS_STARTFILE_SPEC): Define if undefined.
index e8961f24317217823fb4be8d82f75a60db767548..54f750c8384c8905267910e5eb08544906d83b1d 100644 (file)
@@ -2154,11 +2154,8 @@ BU_P9V_64BIT_VSX_1 (VSESDP,      "scalar_extract_sig",   CONST,  xsxsigdp)
 
 BU_FLOAT128_HW_VSX_1 (VSEEQP,  "scalar_extract_expq",  CONST,  xsxexpqp_kf)
 BU_FLOAT128_HW_VSX_1 (VSESQP,  "scalar_extract_sigq",  CONST,  xsxsigqp_kf)
-BU_FLOAT128_HW_VSX_1 (VSEETF,  "scalar_extract_exptf", CONST,  xsxexpqp_tf)
-BU_FLOAT128_HW_VSX_1 (VSESTF,  "scalar_extract_sigtf", CONST,  xsxsigqp_tf)
 
 BU_FLOAT128_HW_VSX_1 (VSTDCNQP, "scalar_test_neg_qp",  CONST,  xststdcnegqp_kf)
-BU_FLOAT128_HW_VSX_1 (VSTDCNTF, "scalar_test_neg_tf",  CONST,  xststdcnegqp_tf)
 BU_P9V_VSX_1 (VSTDCNDP,        "scalar_test_neg_dp",   CONST,  xststdcnegdp)
 BU_P9V_VSX_1 (VSTDCNSP,        "scalar_test_neg_sp",   CONST,  xststdcnegsp)
 
@@ -2176,8 +2173,6 @@ BU_P9V_64BIT_VSX_2 (VSIEDPF,      "scalar_insert_exp_dp", CONST,  xsiexpdpf)
 
 BU_FLOAT128_HW_VSX_2 (VSIEQP,  "scalar_insert_exp_q",  CONST,  xsiexpqp_kf)
 BU_FLOAT128_HW_VSX_2 (VSIEQPF, "scalar_insert_exp_qp", CONST,  xsiexpqpf_kf)
-BU_FLOAT128_HW_VSX_2 (VSIETF,  "scalar_insert_exp_tf", CONST,  xsiexpqp_tf)
-BU_FLOAT128_HW_VSX_2 (VSIETFF, "scalar_insert_exp_tfp", CONST, xsiexpqpf_tf)
 
 BU_P9V_VSX_2 (VSCEDPGT,        "scalar_cmp_exp_dp_gt", CONST,  xscmpexpdp_gt)
 BU_P9V_VSX_2 (VSCEDPLT,        "scalar_cmp_exp_dp_lt", CONST,  xscmpexpdp_lt)
@@ -2189,13 +2184,7 @@ BU_P9V_VSX_2 (VSCEQPLT,  "scalar_cmp_exp_qp_lt", CONST,  xscmpexpqp_lt_kf)
 BU_P9V_VSX_2 (VSCEQPEQ,        "scalar_cmp_exp_qp_eq", CONST,  xscmpexpqp_eq_kf)
 BU_P9V_VSX_2 (VSCEQPUO,        "scalar_cmp_exp_qp_unordered",  CONST,  xscmpexpqp_unordered_kf)
 
-BU_P9V_VSX_2 (VSCETFGT,        "scalar_cmp_exp_tf_gt", CONST,  xscmpexpqp_gt_tf)
-BU_P9V_VSX_2 (VSCETFLT,        "scalar_cmp_exp_tf_lt", CONST,  xscmpexpqp_lt_tf)
-BU_P9V_VSX_2 (VSCETFEQ,        "scalar_cmp_exp_tf_eq", CONST,  xscmpexpqp_eq_tf)
-BU_P9V_VSX_2 (VSCETFUO,        "scalar_cmp_exp_tf_unordered", CONST, xscmpexpqp_unordered_tf)
-
 BU_FLOAT128_HW_VSX_2 (VSTDCQP, "scalar_test_data_class_qp",    CONST,  xststdcqp_kf)
-BU_FLOAT128_HW_VSX_2 (VSTDCTF, "scalar_test_data_class_tf",    CONST,  xststdcqp_tf)
 BU_P9V_VSX_2 (VSTDCDP, "scalar_test_data_class_dp",    CONST,  xststdcdp)
 BU_P9V_VSX_2 (VSTDCSP, "scalar_test_data_class_sp",    CONST,  xststdcsp)
 
index c0499be890f87a813c6830345f91fa7b4a5c2818..e59eff95cf4b11cd13f78b6bc97aac380525ed44 100644 (file)
@@ -675,39 +675,15 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
       builtin_define ("__builtin_vsx_xvnmsubmsp=__builtin_vsx_xvnmsubsp");
     }
 
-  /* Map the old _Float128 'q' builtins into the new 'f128' builtins if long
-     double is IBM or 64-bit.
-
-     However, if long double is IEEE 128-bit, map both sets of built-in
-     functions to the normal long double version.  This shows up in nansf128
-     vs. nanf128.  */
+  /* Map the old _Float128 'q' builtins into the new 'f128' builtins.  */
   if (TARGET_FLOAT128_TYPE)
     {
-      if (FLOAT128_IEEE_P (TFmode))
-       {
-         builtin_define ("__builtin_fabsq=__builtin_fabsl");
-         builtin_define ("__builtin_copysignq=__builtin_copysignl");
-         builtin_define ("__builtin_nanq=__builtin_nanl");
-         builtin_define ("__builtin_nansq=__builtin_nansl");
-         builtin_define ("__builtin_infq=__builtin_infl");
-         builtin_define ("__builtin_huge_valq=__builtin_huge_vall");
-
-         builtin_define ("__builtin_fabsf128=__builtin_fabsl");
-         builtin_define ("__builtin_copysignf128=__builtin_copysignl");
-         builtin_define ("__builtin_nanf128=__builtin_nanl");
-         builtin_define ("__builtin_nansf128=__builtin_nansl");
-         builtin_define ("__builtin_inff128=__builtin_infl");
-         builtin_define ("__builtin_huge_valf128=__builtin_huge_vall");
-       }
-      else
-       {
-         builtin_define ("__builtin_fabsq=__builtin_fabsf128");
-         builtin_define ("__builtin_copysignq=__builtin_copysignf128");
-         builtin_define ("__builtin_nanq=__builtin_nanf128");
-         builtin_define ("__builtin_nansq=__builtin_nansf128");
-         builtin_define ("__builtin_infq=__builtin_inff128");
-         builtin_define ("__builtin_huge_valq=__builtin_huge_valf128");
-       }
+      builtin_define ("__builtin_fabsq=__builtin_fabsf128");
+      builtin_define ("__builtin_copysignq=__builtin_copysignf128");
+      builtin_define ("__builtin_nanq=__builtin_nanf128");
+      builtin_define ("__builtin_nansq=__builtin_nansf128");
+      builtin_define ("__builtin_infq=__builtin_inff128");
+      builtin_define ("__builtin_huge_valq=__builtin_huge_valf128");
     }
 
   /* Tell users they can use __builtin_bswap{16,64}.  */
index d58fd6ba153fc425d83a2b374e87dc628bd01cdb..68164b912f066c0b4e16f92d599bb37600cdfa9e 100644 (file)
@@ -4565,8 +4565,6 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
     RS6000_BTI_bool_int, RS6000_BTI_double, RS6000_BTI_INTSI, 0 },
   { P9V_BUILTIN_VEC_VSTDC, P9V_BUILTIN_VSTDCQP,
     RS6000_BTI_bool_int, RS6000_BTI_ieee128_float, RS6000_BTI_INTSI, 0 },
-  { P9V_BUILTIN_VEC_VSTDC, P9V_BUILTIN_VSTDCTF,
-    RS6000_BTI_bool_int, RS6000_BTI_long_double, RS6000_BTI_INTSI, 0 },
 
   { P9V_BUILTIN_VEC_VSTDCSP, P9V_BUILTIN_VSTDCSP,
     RS6000_BTI_bool_int, RS6000_BTI_float, RS6000_BTI_INTSI, 0 },
@@ -4574,8 +4572,6 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
     RS6000_BTI_bool_int, RS6000_BTI_double, RS6000_BTI_INTSI, 0 },
   { P9V_BUILTIN_VEC_VSTDCQP, P9V_BUILTIN_VSTDCQP,
     RS6000_BTI_bool_int, RS6000_BTI_ieee128_float, RS6000_BTI_INTSI, 0 },
-  { P9V_BUILTIN_VEC_VSTDCQP, P9V_BUILTIN_VSTDCTF,
-    RS6000_BTI_bool_int, RS6000_BTI_long_double, RS6000_BTI_INTSI, 0 },
 
   { P9V_BUILTIN_VEC_VSTDCN, P9V_BUILTIN_VSTDCNSP,
     RS6000_BTI_bool_int, RS6000_BTI_float, 0, 0 },
@@ -4583,8 +4579,6 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
     RS6000_BTI_bool_int, RS6000_BTI_double, 0, 0 },
   { P9V_BUILTIN_VEC_VSTDCN, P9V_BUILTIN_VSTDCNQP,
     RS6000_BTI_bool_int, RS6000_BTI_ieee128_float, 0, 0 },
-  { P9V_BUILTIN_VEC_VSTDCN, P9V_BUILTIN_VSTDCNTF,
-    RS6000_BTI_bool_int, RS6000_BTI_long_double, 0, 0 },
 
   { P9V_BUILTIN_VEC_VSTDCNSP, P9V_BUILTIN_VSTDCNSP,
     RS6000_BTI_bool_int, RS6000_BTI_float, 0, 0 },
@@ -4592,22 +4586,16 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
     RS6000_BTI_bool_int, RS6000_BTI_double, 0, 0 },
   { P9V_BUILTIN_VEC_VSTDCNQP, P9V_BUILTIN_VSTDCNQP,
     RS6000_BTI_bool_int, RS6000_BTI_ieee128_float, 0, 0 },
-  { P9V_BUILTIN_VEC_VSTDCNQP, P9V_BUILTIN_VSTDCNTF,
-    RS6000_BTI_bool_int, RS6000_BTI_long_double, 0, 0 },
 
   { P9V_BUILTIN_VEC_VSEEDP, P9V_BUILTIN_VSEEDP,
     RS6000_BTI_UINTSI, RS6000_BTI_double, 0, 0 },
   { P9V_BUILTIN_VEC_VSEEDP, P9V_BUILTIN_VSEEQP,
     RS6000_BTI_UINTDI, RS6000_BTI_ieee128_float, 0, 0 },
-  { P9V_BUILTIN_VEC_VSEEDP, P9V_BUILTIN_VSEETF,
-    RS6000_BTI_UINTDI, RS6000_BTI_long_double, 0, 0 },
 
   { P9V_BUILTIN_VEC_VSESDP, P9V_BUILTIN_VSESDP,
     RS6000_BTI_UINTDI, RS6000_BTI_double, 0, 0 },
   { P9V_BUILTIN_VEC_VSESDP, P9V_BUILTIN_VSESQP,
     RS6000_BTI_UINTTI, RS6000_BTI_ieee128_float, 0, 0 },
-  { P9V_BUILTIN_VEC_VSESDP, P9V_BUILTIN_VSESTF,
-    RS6000_BTI_UINTTI, RS6000_BTI_long_double, 0, 0 },
 
   { P9V_BUILTIN_VEC_VSIEDP, P9V_BUILTIN_VSIEDP,
     RS6000_BTI_double, RS6000_BTI_UINTDI, RS6000_BTI_UINTDI, 0 },
@@ -4616,37 +4604,25 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
 
   { P9V_BUILTIN_VEC_VSIEDP, P9V_BUILTIN_VSIEQP,
     RS6000_BTI_ieee128_float, RS6000_BTI_UINTTI, RS6000_BTI_UINTDI, 0 },
-  { P9V_BUILTIN_VEC_VSIEDP, P9V_BUILTIN_VSIETF,
-    RS6000_BTI_long_double, RS6000_BTI_UINTTI, RS6000_BTI_UINTDI, 0 },
   { P9V_BUILTIN_VEC_VSIEDP, P9V_BUILTIN_VSIEQPF,
     RS6000_BTI_ieee128_float, RS6000_BTI_ieee128_float, RS6000_BTI_UINTDI, 0 },
-  { P9V_BUILTIN_VEC_VSIEDP, P9V_BUILTIN_VSIETFF,
-    RS6000_BTI_long_double, RS6000_BTI_long_double, RS6000_BTI_UINTDI, 0 },
 
   { P9V_BUILTIN_VEC_VSCEGT, P9V_BUILTIN_VSCEDPGT,
     RS6000_BTI_INTSI, RS6000_BTI_double, RS6000_BTI_double, 0 },
   { P9V_BUILTIN_VEC_VSCEGT, P9V_BUILTIN_VSCEQPGT,
     RS6000_BTI_INTSI, RS6000_BTI_ieee128_float, RS6000_BTI_ieee128_float, 0 },
-  { P9V_BUILTIN_VEC_VSCEGT, P9V_BUILTIN_VSCETFGT,
-    RS6000_BTI_INTSI, RS6000_BTI_long_double, RS6000_BTI_long_double, 0 },
   { P9V_BUILTIN_VEC_VSCELT, P9V_BUILTIN_VSCEDPLT,
     RS6000_BTI_INTSI, RS6000_BTI_double, RS6000_BTI_double, 0 },
   { P9V_BUILTIN_VEC_VSCELT, P9V_BUILTIN_VSCEQPLT,
     RS6000_BTI_INTSI, RS6000_BTI_ieee128_float, RS6000_BTI_ieee128_float, 0 },
-  { P9V_BUILTIN_VEC_VSCELT, P9V_BUILTIN_VSCETFLT,
-    RS6000_BTI_INTSI, RS6000_BTI_long_double, RS6000_BTI_long_double, 0 },
   { P9V_BUILTIN_VEC_VSCEEQ, P9V_BUILTIN_VSCEDPEQ,
     RS6000_BTI_INTSI, RS6000_BTI_double, RS6000_BTI_double, 0 },
   { P9V_BUILTIN_VEC_VSCEEQ, P9V_BUILTIN_VSCEQPEQ,
     RS6000_BTI_INTSI, RS6000_BTI_ieee128_float, RS6000_BTI_ieee128_float, 0 },
-  { P9V_BUILTIN_VEC_VSCEEQ, P9V_BUILTIN_VSCETFEQ,
-    RS6000_BTI_INTSI, RS6000_BTI_long_double, RS6000_BTI_long_double, 0 },
   { P9V_BUILTIN_VEC_VSCEUO, P9V_BUILTIN_VSCEDPUO,
     RS6000_BTI_INTSI, RS6000_BTI_double, RS6000_BTI_double, 0 },
   { P9V_BUILTIN_VEC_VSCEUO, P9V_BUILTIN_VSCEQPUO,
     RS6000_BTI_INTSI, RS6000_BTI_ieee128_float, RS6000_BTI_ieee128_float, 0 },
-  { P9V_BUILTIN_VEC_VSCEUO, P9V_BUILTIN_VSCETFUO,
-    RS6000_BTI_INTSI, RS6000_BTI_long_double, RS6000_BTI_long_double, 0 },
 
   { P9V_BUILTIN_VEC_XL_LEN_R, P9V_BUILTIN_XL_LEN_R,
     RS6000_BTI_unsigned_V16QI, ~RS6000_BTI_UINTQI,
@@ -11584,22 +11560,6 @@ rs6000_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
       case CODE_FOR_xsiexpqp_kf:       icode = CODE_FOR_xsiexpqp_tf;   break;
       case CODE_FOR_xsiexpqpf_kf:      icode = CODE_FOR_xsiexpqpf_tf;  break;
       case CODE_FOR_xststdcqp_kf:      icode = CODE_FOR_xststdcqp_tf;  break;
-
-      case CODE_FOR_xscmpexpqp_eq_kf:
-       icode = CODE_FOR_xscmpexpqp_eq_tf;
-       break;
-
-      case CODE_FOR_xscmpexpqp_lt_kf:
-       icode = CODE_FOR_xscmpexpqp_lt_tf;
-       break;
-
-      case CODE_FOR_xscmpexpqp_gt_kf:
-       icode = CODE_FOR_xscmpexpqp_gt_tf;
-       break;
-
-      case CODE_FOR_xscmpexpqp_unordered_kf:
-       icode = CODE_FOR_xscmpexpqp_unordered_tf;
-       break;
       }
 
   if (TARGET_DEBUG_BUILTIN)
index 6271d4c00e0ae1d162152d2eaf59281d036e2dfb..355aea8628def909bef27e6baaed8bbeae887207 100644 (file)
@@ -26326,122 +26326,55 @@ rs6000_globalize_decl_name (FILE * stream, tree decl)
    library before you can switch the real*16 type at compile time.
 
    We use the TARGET_MANGLE_DECL_ASSEMBLER_NAME hook to change this name.  We
-   only do this transformation if the __float128 type is enabled.  This
-   prevents us from doing the transformation on older 32-bit parts that might
-   have enabled using IEEE 128-bit floating point as the default long double
-   type.  */
+   only do this if the default is that long double is IBM extended double, and
+   the user asked for IEEE 128-bit.  */
 
 static tree
 rs6000_mangle_decl_assembler_name (tree decl, tree id)
 {
-  if (TARGET_FLOAT128_TYPE && TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128
-      && TREE_CODE (decl) == FUNCTION_DECL
-      && fndecl_built_in_p (decl, BUILT_IN_NORMAL))
+  if (!TARGET_IEEEQUAD_DEFAULT && TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128
+      && TREE_CODE (decl) == FUNCTION_DECL && DECL_IS_BUILTIN (decl) )
     {
       size_t len = IDENTIFIER_LENGTH (id);
       const char *name = IDENTIFIER_POINTER (id);
-      const char *newname = NULL;
 
-      /* See if it is one of the built-in functions with an unusual name.  */
-      switch (DECL_FUNCTION_CODE (decl))
+      if (name[len - 1] == 'l')
        {
-       default:
-         break;
-
-       case BUILT_IN_GAMMAL_R:
-       case BUILT_IN_LGAMMAL_R:
-         newname = "__lgammaieee128_r";
-         break;
-
-       case BUILT_IN_NEXTTOWARD:
-         newname = "__nexttoward_to_ieee128";
-         break;
-
-       case BUILT_IN_NEXTTOWARDF:
-         newname = "__nexttowardf_to_ieee128";
-         break;
-
-       case BUILT_IN_NEXTTOWARDL:
-         newname = "__nexttowardieee128";
-         break;
-       }
-
-      /* Update the __builtin_*printf && __builtin_*scanf functions.  */
-      if (!newname)
-       {
-         const size_t printf_len = sizeof ("printf") - 1;
-         const size_t scanf_len = sizeof ("scanf") - 1;
-         const size_t printf_extra
-           = sizeof ("__") - 1 + sizeof ("ieee128") - 1;
-         const size_t scanf_extra
-           = sizeof ("__isoc99_") - 1 + sizeof ("ieee128") - 1;
-
-         if (len >= printf_len
-             && strcmp (name + len - printf_len, "printf") == 0)
-           {
-             char *name2 = (char *) alloca (len + 1 + printf_extra);
-             strcpy (name2, "__");
-             memcpy (name2 + 2, name, len);
-             strcpy (name2 + 2 + len, "ieee128");
-             newname = (const char *) name2;
-           }
+         bool uses_ieee128_p = false;
+         tree type = TREE_TYPE (decl);
+         machine_mode ret_mode = TYPE_MODE (type);
 
-         else if (len >= scanf_len
-                  && strcmp (name + len - scanf_len, "scanf") == 0)
+         /* See if the function returns a IEEE 128-bit floating point type or
+            complex type.  */
+         if (ret_mode == TFmode || ret_mode == TCmode)
+           uses_ieee128_p = true;
+         else
            {
-             char *name2 = (char *) alloca (len + 1 + scanf_extra);
-             strcpy (name2, "__isoc99_");
-             memcpy (name2 + sizeof ("__isoc99") - 1, name, len);
-             strcpy (name2 + sizeof ("__isoc99") - 1 + len, "ieee128");
-             newname = (const char *) name2;
-           }
+             function_args_iterator args_iter;
+             tree arg;
 
-         else if (name[len - 1] == 'l')
-           {
-             bool uses_ieee128_p = false;
-             tree type = TREE_TYPE (decl);
-             machine_mode ret_mode = TYPE_MODE (type);
-
-             /* See if the function returns a IEEE 128-bit floating point type or
-                complex type.  */
-             if (ret_mode == TFmode || ret_mode == TCmode)
-               uses_ieee128_p = true;
-             else
+             /* See if the function passes a IEEE 128-bit floating point type
+                or complex type.  */
+             FOREACH_FUNCTION_ARGS (type, arg, args_iter)
                {
-                 function_args_iterator args_iter;
-                 tree arg;
-
-                 /* See if the function passes a IEEE 128-bit floating point type
-                    or complex type.  */
-                 FOREACH_FUNCTION_ARGS (type, arg, args_iter)
+                 machine_mode arg_mode = TYPE_MODE (arg);
+                 if (arg_mode == TFmode || arg_mode == TCmode)
                    {
-                     machine_mode arg_mode = TYPE_MODE (arg);
-                     if (arg_mode == TFmode || arg_mode == TCmode)
-                       {
-                         uses_ieee128_p = true;
-                         break;
-                       }
+                     uses_ieee128_p = true;
+                     break;
                    }
                }
-
-             /* If we passed or returned an IEEE 128-bit floating point type,
-                change the name.  */
-             if (uses_ieee128_p)
-               {
-                 char *name2 = (char *) alloca (len + 4);
-                 memcpy (name2, name, len - 1);
-                 strcpy (name2 + len - 1, "f128");
-                 newname = (const char *) name2;
-               }
            }
-       }
 
-      if (newname)
-       {
-         if (TARGET_DEBUG_BUILTIN)
-           fprintf (stderr, "Map %s => %s\n", name, newname);
-
-         id = get_identifier (newname);
+         /* If we passed or returned an IEEE 128-bit floating point type,
+            change the name.  */
+         if (uses_ieee128_p)
+           {
+             char *name2 = (char *) alloca (len + 4);
+             memcpy (name2, name, len - 1);
+             strcpy (name2 + len - 1, "f128");
+             id = get_identifier (name2);
+           }
        }
     }
 
index 97a1ad5078e4ff8efff32a354835de0a4b21a8e4..eeb502b3c2db58e25728d7548161929a90969508 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-05  Michael Meissner  <meissner@linux.ibm.com>
+
+       * gcc.dg/nextafter-2.c: Delete changes meant for a private branch.
+       * gcc.target/powerpc/pr70117.c: Likewise.
+
 2020-05-05  Dimitar Dimitrov  <dimitar@dinux.eu>
 
        * gcc.target/pru/clobber-sp.c: New test.
index 64e9e3c485f40aaa87d2caaa595d61df4cd09837..e51ae94be0c27d9d025efba81ebb057d0ad54baa 100644 (file)
 #  define NO_LONG_DOUBLE 1
 # endif
 #endif
-
-#if defined(_ARCH_PPC) && defined(__LONG_DOUBLE_IEEE128__)
-/* On PowerPC systems, long double uses either the IBM long double format, or
-   IEEE 128-bit format.  The compiler switches the long double built-in
-   function names and glibc switches the names when math.h is included.
-   Because this test is run with -fno-builtin, include math.h so that the
-   appropriate nextafter functions are called.  */
-#include <math.h>
-#endif
-
 #include "nextafter-1.c"
index 928efe39c7b8a6aebd244690ffab74dce9b82536..3bbd2c595e0426d55e782a77097385eb081db125 100644 (file)
@@ -9,11 +9,9 @@
    128-bit floating point, because the type is not enabled on those
    systems.  */
 #define LDOUBLE __ibm128
-#define IBM128_MAX ((__ibm128) 1.79769313486231580793728971405301199e+308L)
 
 #elif defined(__LONG_DOUBLE_IBM128__)
 #define LDOUBLE long double
-#define IBM128_MAX LDBL_MAX
 
 #else
 #error "long double must be either IBM 128-bit or IEEE 128-bit"
@@ -77,10 +75,10 @@ main (void)
   if (__builtin_isnormal (ld))
     __builtin_abort ();
 
-  ld = IBM128_MAX;
+  ld = LDBL_MAX;
   if (!__builtin_isnormal (ld))
     __builtin_abort ();
-  ld = -IBM128_MAX;
+  ld = -LDBL_MAX;
   if (!__builtin_isnormal (ld))
     __builtin_abort ();
 
index cc6df8a9aa7c3aed1b008c180aca3aa921d3c1c2..49d757f9061fa5fe0eea428205a19c7540b551d6 100644 (file)
@@ -1,3 +1,10 @@
+2020-05-05  Michael Meissner  <meissner@linux.ibm.com>
+
+       * config.host: Delete changes meant for a private branch.
+       * config/rs6000/t-float128: Likewise.
+       * configure.ac: Likewise.
+       * configure: Likewise.
+
 2020-05-05  Martin Liska  <mliska@suse.cz>
 
        PR gcov-profile/93623
index 7b48a3d476a710e3fee550d1b5f7b06d81f5a74b..1ff41592337e2fea20ebaaaaeb489e08c723eacc 100644 (file)
@@ -1220,9 +1220,6 @@ powerpc*-*-linux*)
 
        if test $libgcc_cv_powerpc_float128 = yes; then
                tmake_file="${tmake_file} rs6000/t-float128"
-               if test $libgcc_cv_powerpc_float128_dec = no; then
-                       tmake_file="${tmake_file} rs6000/t-float128-decimal"
-               fi
        fi
 
        if test $libgcc_cv_powerpc_float128_hw = yes; then
index 4d4e80cbadfcf803c634e221c699cc5172c4e96f..d541344518902cbcf200a454c5efdf2fbe200d22 100644 (file)
@@ -69,13 +69,6 @@ $(fp128_ppc_obj)      : INTERNAL_CFLAGS += $(FP128_CFLAGS_SW)
 $(fp128_obj)            : $(fp128_includes)
 $(fp128_obj)            : $(srcdir)/config/rs6000/quad-float128.h
 
-
-# If we are switching the default long double type, we need to use
-# -mno-gnu-attribute so that the __ibm128 support functions don't signal a
-# linker error since the default long double is now IEEE 128-bit instead of IBM
-# 128-bit.
-ibm-ldouble$(objext)   : INTERNAL_CFLAGS += -mno-gnu-attribute
-
 $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
        @src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
        echo "Create $@"; \
index 943086eef843438b50254dd4b762ff8fe7252811..26bf75789e0d999fd5edbdc6e93d356474b298be 100755 (executable)
@@ -1801,52 +1801,6 @@ $as_echo "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_preproc
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -5247,9 +5201,7 @@ case ${host} in
 # At present, we cannot turn -mfloat128 on via #pragma GCC target, so just
 # 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.  Check
-# to see if glibc provides the necessary decimal <-> IEEE 128 function, and
-# arrange to build our own version if they are not provided.
+# a new glibc is being used so that __builtin_cpu_supports can be used.
 powerpc*-*-linux*)
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128"
@@ -5306,64 +5258,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float128_hw" >&5
 $as_echo "$libgcc_cv_powerpc_float128_hw" >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PowerPC convert __float128 to/from _Decimal libraries" >&5
-$as_echo_n "checking for PowerPC convert __float128 to/from _Decimal libraries... " >&6; }
-if ${libgcc_cv_powerpc_float128_dec+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-     __attribute__((noinline)) __float128 f128_from_d128 (_Decimal128 d128)
-     {
-       return (__float128)d128;
-     }
-     __attribute__((noinline)) __float128 f128_from_d64 (_Decimal128 d64)
-     {
-       return (__float128)d64;
-     }
-     __attribute__((noinline)) __float128 f128_from_d32 (_Decimal128 d32)
-     {
-       return (__float128)d32;
-     }
-     __attribute__((noinline)) _Decimal128 d128_from_f128 (__float128 f128)
-     {
-       return (_Decimal128)f128;
-     }
-     __attribute__((noinline)) _Decimal64 d64_from_f128 (__float128 f128)
-     {
-       return (_Decimal64)f128;
-     }
-     __attribute__((noinline)) _Decimal32 d32_from_f128 (__float128 f128)
-     {
-       return (_Decimal32)f128;
-     }
-     int main (void)
-     {
-       __float128 five = 5.0;
-       if (f128_from_d128 (5.0dl) != five
-           || f128_from_d64 (5.0dd) != five
-           || f128_from_d32 (5.0df) != five
-           || d128_from_f128 (five) != 5.0dl
-           || d64_from_f128 (five) != 5.0dd
-           || d32_from_f128 (five) != 5.0df)
-         abort ();
-       return 0;
-     }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  libgcc_cv_powerpc_float128_dec=yes
-else
-  libgcc_cv_powerpc_float128_dec=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float128_dec" >&5
-$as_echo "$libgcc_cv_powerpc_float128_dec" >&6; }
   CFLAGS="$saved_CFLAGS"
 esac
 
index 4aa03a45f1aaf0fc39b186e3d13f0d98720cf2eb..bff6e54f22e019f4703f3f7dec9b49b581d317c3 100644 (file)
@@ -424,9 +424,7 @@ case ${host} in
 # At present, we cannot turn -mfloat128 on via #pragma GCC target, so just
 # 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.  Check
-# to see if glibc provides the necessary decimal <-> IEEE 128 function, and
-# arrange to build our own version if they are not provided.
+# a new glibc is being used so that __builtin_cpu_supports can be used.
 powerpc*-*-linux*)
   saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128"
@@ -459,48 +457,6 @@ powerpc*-*-linux*)
        __attribute__ ((__ifunc__ ("add_resolver")));])],
     [libgcc_cv_powerpc_float128_hw=yes],
     [libgcc_cv_powerpc_float128_hw=no])])
-  AC_CACHE_CHECK([for PowerPC convert __float128 to/from _Decimal libraries],
-                [libgcc_cv_powerpc_float128_dec],
-                [AC_LINK_IFELSE(
-    [AC_LANG_SOURCE([#include <stdlib.h>
-     __attribute__((noinline)) __float128 f128_from_d128 (_Decimal128 d128)
-     {
-       return (__float128)d128;
-     }
-     __attribute__((noinline)) __float128 f128_from_d64 (_Decimal128 d64)
-     {
-       return (__float128)d64;
-     }
-     __attribute__((noinline)) __float128 f128_from_d32 (_Decimal128 d32)
-     {
-       return (__float128)d32;
-     }
-     __attribute__((noinline)) _Decimal128 d128_from_f128 (__float128 f128)
-     {
-       return (_Decimal128)f128;
-     }
-     __attribute__((noinline)) _Decimal64 d64_from_f128 (__float128 f128)
-     {
-       return (_Decimal64)f128;
-     }
-     __attribute__((noinline)) _Decimal32 d32_from_f128 (__float128 f128)
-     {
-       return (_Decimal32)f128;
-     }
-     int main (void)
-     {
-       __float128 five = 5.0;
-       if (f128_from_d128 (5.0dl) != five
-           || f128_from_d64 (5.0dd) != five
-           || f128_from_d32 (5.0df) != five
-           || d128_from_f128 (five) != 5.0dl
-           || d64_from_f128 (five) != 5.0dd
-           || d32_from_f128 (five) != 5.0df)
-         abort ();
-       return 0;
-     }])],
-    [libgcc_cv_powerpc_float128_dec=yes],
-    [libgcc_cv_powerpc_float128_dec=no])])
   CFLAGS="$saved_CFLAGS"
 esac