diff options
author | Michael Meissner <Michael Meissner meissner@linux.ibm.com> | 2020-05-05 13:37:28 -0400 |
---|---|---|
committer | Michael Meissner <Michael Meissner meissner@linux.ibm.com> | 2020-05-05 13:37:28 -0400 |
commit | db23381603d9725b120bbfdb8d67f79ad62a3033 (patch) | |
tree | 4f3147362bff26d8b6c4efce03017079b7a836be | |
parent | 931ab4fd3348dd19b6bee6e9db170f27f1504dc9 (diff) | |
download | gcc-db23381603d9725b120bbfdb8d67f79ad62a3033.zip gcc-db23381603d9725b120bbfdb8d67f79ad62a3033.tar.gz gcc-db23381603d9725b120bbfdb8d67f79ad62a3033.tar.bz2 |
Patch ieee128-lib-patch007b
-rw-r--r-- | gcc/ChangeLog.meissner | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 18 |
2 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index 4de6d61..31ecbb7 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,5 +1,12 @@ 2020-05-05 Michael Meissner <meissner@linux.ibm.com> + (ieee128-lib-patch007b) + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map all of + the special f128 constant builtins to the long double version if + long double is IEEE 128-bit. + +2020-05-05 Michael Meissner <meissner@linux.ibm.com> + (ieee128-lib-patch005b) * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long double is IEEE 128-bit, map the old 'q' built-in functions to diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index 206230a..c0499be 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -675,13 +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. However, - if long double is IEEE 128-bit, map the built-in functions to the normal - long double version. In addition, if the default long double type is - IEEE, the nans builtins seem to generate the normal nan builtin value. */ + /* 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. */ if (TARGET_FLOAT128_TYPE) { - if (TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128) + if (FLOAT128_IEEE_P (TFmode)) { builtin_define ("__builtin_fabsq=__builtin_fabsl"); builtin_define ("__builtin_copysignq=__builtin_copysignl"); @@ -689,7 +691,13 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile) 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 { |