Commit 83cbbe3a by Michael Meissner Committed by Michael Meissner

rs6000.c (is_complex_IBM_long_double): Explicitly check for 128-bit long double…

rs6000.c (is_complex_IBM_long_double): Explicitly check for 128-bit long double before checking TCmode.

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.

From-SVN: r256458
parent c42d0aa0
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> 2018-01-10 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83671 PR tree-optimization/83671
......
...@@ -11429,7 +11429,7 @@ rs6000_must_pass_in_stack (machine_mode mode, const_tree type) ...@@ -11429,7 +11429,7 @@ rs6000_must_pass_in_stack (machine_mode mode, const_tree type)
static inline bool static inline bool
is_complex_IBM_long_double (machine_mode mode) 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 /* Whether ABI_V4 passes MODE args to a function in floating point
...@@ -437,11 +437,13 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); ...@@ -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 Similarly IFmode is the IBM long double format even if the default is IEEE
128-bit. Don't allow IFmode if -msoft-float. */ 128-bit. Don't allow IFmode if -msoft-float. */
#define FLOAT128_IEEE_P(MODE) \ #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)) || ((MODE) == KFmode) || ((MODE) == KCmode))
#define FLOAT128_IBM_P(MODE) \ #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))) || (TARGET_HARD_FLOAT && ((MODE) == IFmode || (MODE) == ICmode)))
/* Helper macros to say whether a 128-bit floating point type can go in a /* Helper macros to say whether a 128-bit floating point type can go in a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment