+2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * 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 <msebor@redhat.com>
PR tree-optimization/83671
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
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