diff options
author | Jakub Jelinek <jj@ultra.linux.cz> | 1999-06-21 19:52:47 +0200 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-06-21 10:52:47 -0700 |
commit | 8fc4af0f11b77630079ff1e33a527d933aca1ee0 (patch) | |
tree | f88a2e0fc3c24e36bc72c12f112b74f2249cbb76 /gcc/emit-rtl.c | |
parent | 2be15d0fe6c4baaa54a75580fc5333c4b092009f (diff) | |
download | gcc-8fc4af0f11b77630079ff1e33a527d933aca1ee0.zip gcc-8fc4af0f11b77630079ff1e33a527d933aca1ee0.tar.gz gcc-8fc4af0f11b77630079ff1e33a527d933aca1ee0.tar.bz2 |
Jakub Jelinek <jj@ultra.linux.cz>
Jakub Jelinek <jj@ultra.linux.cz>
* real.c (ereal_from_double): Fix for 64-bit big endian hosts.
* emit-rtl.c (gen_lowpart_common): Add case for hosts where double
fits in HOST_WIDE_INT and one uses union to access a long constant
as double.
From-SVN: r27675
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index f1caea7..0b310f2 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -896,6 +896,22 @@ gen_lowpart_common (mode, x) r = REAL_VALUE_FROM_TARGET_SINGLE (i); return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); } + else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT + && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) + || flag_pretend_float) + && GET_MODE_CLASS (mode) == MODE_FLOAT + && GET_MODE_SIZE (mode) == UNITS_PER_WORD + && GET_CODE (x) == CONST_INT + && (sizeof (double) * HOST_BITS_PER_CHAR + == HOST_BITS_PER_WIDE_INT)) + { + REAL_VALUE_TYPE r; + HOST_WIDE_INT i; + + i = INTVAL (x); + r = REAL_VALUE_FROM_TARGET_DOUBLE (&i); + return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); + } #endif /* Similarly, if this is converting a floating-point value into a |