aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Meissner <Michael Meissner meissner@linux.ibm.com>2020-05-05 14:01:48 -0400
committerMichael Meissner <Michael Meissner meissner@linux.ibm.com>2020-05-05 14:03:30 -0400
commitef836167f594c4657404e16e7fd18196348f8582 (patch)
treef3e1892ee75c9fdfe5293a7aa27434f0860e4c03 /gcc
parent3338afa4a3416f5d9a77c8d888f4a46052af186a (diff)
downloadgcc-ef836167f594c4657404e16e7fd18196348f8582.zip
gcc-ef836167f594c4657404e16e7fd18196348f8582.tar.gz
gcc-ef836167f594c4657404e16e7fd18196348f8582.tar.bz2
Delete changes meant for a private branch.
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/rs6000/rs6000-builtin.def11
-rw-r--r--gcc/config/rs6000/rs6000-c.c38
-rw-r--r--gcc/config/rs6000/rs6000-call.c40
-rw-r--r--gcc/config/rs6000/rs6000.c129
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/nextafter-2.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr70117.c6
8 files changed, 53 insertions, 194 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 995f0aa..15ac1c3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
index e8961f2..54f750c 100644
--- a/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc/config/rs6000/rs6000-builtin.def
@@ -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)
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index c0499be..e59eff9 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -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}. */
diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index d58fd6b..68164b9 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -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)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6271d4c..355aea8 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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);
+ }
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 97a1ad5..eeb502b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.dg/nextafter-2.c b/gcc/testsuite/gcc.dg/nextafter-2.c
index 64e9e3c..e51ae94 100644
--- a/gcc/testsuite/gcc.dg/nextafter-2.c
+++ b/gcc/testsuite/gcc.dg/nextafter-2.c
@@ -13,14 +13,4 @@
# 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"
diff --git a/gcc/testsuite/gcc.target/powerpc/pr70117.c b/gcc/testsuite/gcc.target/powerpc/pr70117.c
index 928efe3..3bbd2c5 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr70117.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c
@@ -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 ();