From: Michael Meissner Date: Wed, 10 Jan 2018 22:02:31 +0000 (+0000) Subject: rs6000.c (is_complex_IBM_long_double): Explicitly check for 128-bit long double befor... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83cbbe3aa8125d97f832c4644b4e381ac7afd5ae;p=gcc.git rs6000.c (is_complex_IBM_long_double): Explicitly check for 128-bit long double before checking TCmode. 2018-01-10 Michael Meissner * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly check for 128-bit long double before checking TCmode. * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for 128-bit long doubles before checking TFmode or TCmode. (FLOAT128_IBM_P): Likewise. From-SVN: r256458 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 081c04aa8a7..9e7590526e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-01-10 Michael Meissner + + * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly + check for 128-bit long double before checking TCmode. + * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for + 128-bit long doubles before checking TFmode or TCmode. + (FLOAT128_IBM_P): Likewise. + 2018-01-10 Martin Sebor PR tree-optimization/83671 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index f3df0b98462..0a0b49422d8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -11429,7 +11429,7 @@ rs6000_must_pass_in_stack (machine_mode mode, const_tree type) static inline bool is_complex_IBM_long_double (machine_mode mode) { - return mode == ICmode || (!TARGET_IEEEQUAD && mode == TCmode); + return mode == ICmode || (mode == TCmode && FLOAT128_IBM_P (TCmode)); } /* Whether ABI_V4 passes MODE args to a function in floating point diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 6e3d7df11d0..3bffa298355 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -437,11 +437,13 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); Similarly IFmode is the IBM long double format even if the default is IEEE 128-bit. Don't allow IFmode if -msoft-float. */ #define FLOAT128_IEEE_P(MODE) \ - ((TARGET_IEEEQUAD && ((MODE) == TFmode || (MODE) == TCmode)) \ + ((TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128 \ + && ((MODE) == TFmode || (MODE) == TCmode)) \ || ((MODE) == KFmode) || ((MODE) == KCmode)) #define FLOAT128_IBM_P(MODE) \ - ((!TARGET_IEEEQUAD && ((MODE) == TFmode || (MODE) == TCmode)) \ + ((!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128 \ + && ((MODE) == TFmode || (MODE) == TCmode)) \ || (TARGET_HARD_FLOAT && ((MODE) == IFmode || (MODE) == ICmode))) /* Helper macros to say whether a 128-bit floating point type can go in a