Commit e8299ec2 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

mmix.c (mmix_intval): Correct handling of DFmode constants for hosts with long != 32 bits.

	* config/mmix/mmix.c (mmix_intval): Correct handling of DFmode
	constants for hosts with long != 32 bits.

From-SVN: r106027
parent 6536905d
2005-10-30 Hans-Peter Nilsson <hp@bitrange.com>
* config/mmix/mmix.c (mmix_intval): Correct handling of DFmode
constants for hosts with long != 32 bits.
2005-10-28 Andreas Krebbel <krebbel1@de.ibm.com> 2005-10-28 Andreas Krebbel <krebbel1@de.ibm.com>
PR middle-end/24093 PR middle-end/24093
......
...@@ -2705,19 +2705,13 @@ mmix_intval (rtx x) ...@@ -2705,19 +2705,13 @@ mmix_intval (rtx x)
REAL_VALUE_TO_TARGET_DOUBLE (value, bits); REAL_VALUE_TO_TARGET_DOUBLE (value, bits);
if (sizeof (long) < sizeof (HOST_WIDEST_INT)) /* The double cast is necessary to avoid getting the long
{ sign-extended to unsigned long long(!) when they're of
retval = (unsigned long) bits[1] / 2; different size (usually 32-bit hosts). */
retval *= 2; return
retval |= (unsigned long) bits[1] & 1; ((unsigned HOST_WIDEST_INT) (unsigned long) bits[0]
retval << (unsigned HOST_WIDEST_INT) 32U)
|= (unsigned HOST_WIDEST_INT) bits[0] | (unsigned HOST_WIDEST_INT) (unsigned long) bits[1];
<< (sizeof (bits[0]) * 8);
}
else
retval = (unsigned long) bits[1];
return retval;
} }
else if (GET_MODE (x) == SFmode) else if (GET_MODE (x) == SFmode)
{ {
......
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