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
This commit is contained in:
parent
2be15d0fe6
commit
8fc4af0f11
|
@ -1,3 +1,10 @@
|
||||||
|
1999-06-21 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.
|
||||||
|
|
||||||
Mon Jun 21 17:18:25 1999 Richard Henderson <rth@cygnus.com>
|
Mon Jun 21 17:18:25 1999 Richard Henderson <rth@cygnus.com>
|
||||||
|
|
||||||
* sparc.c (sparc_override_options): Don't allow profiling for
|
* sparc.c (sparc_override_options): Don't allow profiling for
|
||||||
|
|
|
@ -896,6 +896,22 @@ gen_lowpart_common (mode, x)
|
||||||
r = REAL_VALUE_FROM_TARGET_SINGLE (i);
|
r = REAL_VALUE_FROM_TARGET_SINGLE (i);
|
||||||
return CONST_DOUBLE_FROM_REAL_VALUE (r, mode);
|
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
|
#endif
|
||||||
|
|
||||||
/* Similarly, if this is converting a floating-point value into a
|
/* Similarly, if this is converting a floating-point value into a
|
||||||
|
|
|
@ -6400,17 +6400,19 @@ ereal_from_double (d)
|
||||||
/* Convert array of HOST_WIDE_INT to equivalent array of 16-bit pieces. */
|
/* Convert array of HOST_WIDE_INT to equivalent array of 16-bit pieces. */
|
||||||
if (REAL_WORDS_BIG_ENDIAN)
|
if (REAL_WORDS_BIG_ENDIAN)
|
||||||
{
|
{
|
||||||
|
#if HOST_BITS_PER_WIDE_INT == 32
|
||||||
s[0] = (unsigned EMUSHORT) (d[0] >> 16);
|
s[0] = (unsigned EMUSHORT) (d[0] >> 16);
|
||||||
s[1] = (unsigned EMUSHORT) d[0];
|
s[1] = (unsigned EMUSHORT) d[0];
|
||||||
#if HOST_BITS_PER_WIDE_INT == 32
|
|
||||||
s[2] = (unsigned EMUSHORT) (d[1] >> 16);
|
s[2] = (unsigned EMUSHORT) (d[1] >> 16);
|
||||||
s[3] = (unsigned EMUSHORT) d[1];
|
s[3] = (unsigned EMUSHORT) d[1];
|
||||||
#else
|
#else
|
||||||
/* In this case the entire target double is contained in the
|
/* In this case the entire target double is contained in the
|
||||||
first array element. The second element of the input is
|
first array element. The second element of the input is
|
||||||
ignored. */
|
ignored. */
|
||||||
s[2] = (unsigned EMUSHORT) (d[0] >> 48);
|
s[0] = (unsigned EMUSHORT) (d[0] >> 48);
|
||||||
s[3] = (unsigned EMUSHORT) (d[0] >> 32);
|
s[1] = (unsigned EMUSHORT) (d[0] >> 32);
|
||||||
|
s[2] = (unsigned EMUSHORT) (d[0] >> 16);
|
||||||
|
s[3] = (unsigned EMUSHORT) d[0];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue