aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.vnet.ibm.com>2018-01-10 22:02:31 +0000
committerMichael Meissner <meissner@gcc.gnu.org>2018-01-10 22:02:31 +0000
commit83cbbe3aa8125d97f832c4644b4e381ac7afd5ae (patch)
tree6abf8dd0960762f686a610cff3d66c43a743a4db
parentc42d0aa0893cab444366c80fdd5b23bb45de6276 (diff)
downloadgcc-83cbbe3aa8125d97f832c4644b4e381ac7afd5ae.zip
gcc-83cbbe3aa8125d97f832c4644b4e381ac7afd5ae.tar.gz
gcc-83cbbe3aa8125d97f832c4644b4e381ac7afd5ae.tar.bz2
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
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/rs6000/rs6000.c2
-rw-r--r--gcc/config/rs6000/rs6000.h6
3 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 081c04a..9e75905 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index f3df0b9..0a0b494 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 6e3d7df..3bffa29 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