This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR target/54347: REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used in i386
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 21 Aug 2012 08:05:27 -0700
- Subject: PATCH: PR target/54347: REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used in i386
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
long double may not be 80-bit on i386. We can't use
REAL_VALUE_TO_TARGET_LONG_DOUBLE for XFmode. This patch replaces
REAL_VALUE_TO_TARGET_LONG_DOUBLE with real_to_target. OK to install?
Thanks.
H.J.
---
2012-08-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/54347
* config/i386/i386.c (ix86_split_to_parts): Replace
REAL_VALUE_TO_TARGET_LONG_DOUBLE with real_to_target.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 5da4da2..a6fc45b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -20743,7 +20743,9 @@ ix86_split_to_parts (rtx operand, rtx *parts, enum machine_mode mode)
parts[2] = gen_int_mode (l[2], SImode);
break;
case XFmode:
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);
+ /* We can't use REAL_VALUE_TO_TARGET_LONG_DOUBLE since
+ long double may not be 80-bit. */
+ real_to_target (l, &r, mode);
parts[2] = gen_int_mode (l[2], SImode);
break;
case DFmode: