Fix 64b-x-32b cross compiler breakage. Make alpha-x-m32r work again.

* emit-rtl.c (operand_subword): Sign extend REAL_VALUE_TO_TARGET_SINGLE
	result.
	* final.c (split_double): Sign extend REAL_VALUE_TO_TARGET_DOUBLE
	result.
	* real.c (endian): Delete sign extension code.
	* config/m32r/m32r.md (movsf_insn+1): REAL_VALUE_TO_TARGET_SINGLE call
	replaced with operand_subword call.

From-SVN: r25140
This commit is contained in:
Jim Wilson 1999-02-10 17:28:24 +00:00 committed by Jim Wilson
parent 01dd4564b6
commit b5a3eb8445
5 changed files with 39 additions and 24 deletions

View File

@ -1,3 +1,13 @@
Wed Feb 10 17:12:21 1999 Jim Wilson <wilson@cygnus.com>
* emit-rtl.c (operand_subword): Sign extend REAL_VALUE_TO_TARGET_SINGLE
result.
* final.c (split_double): Sign extend REAL_VALUE_TO_TARGET_DOUBLE
result.
* real.c (endian): Delete sign extension code.
* config/m32r/m32r.md (movsf_insn+1): REAL_VALUE_TO_TARGET_SINGLE call
replaced with operand_subword call.
Wed Feb 10 15:16:39 1999 Richard Henderson <rth@cygnus.com>
* alpha.md (cmov compound patterns): Delete. Jump can now

View File

@ -589,14 +589,8 @@
[(set (match_dup 2) (match_dup 3))]
"
{
long l;
REAL_VALUE_TYPE rv;
REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]);
REAL_VALUE_TO_TARGET_SINGLE (rv, l);
operands[2] = operand_subword (operands[0], 0, 0, SFmode);
operands[3] = GEN_INT (l);
operands[3] = operand_subword (operands[1], 0, 0, SFmode);
}")
(define_expand "movdf"

View File

@ -1303,6 +1303,18 @@ operand_subword (op, i, validate_address, mode)
REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
REAL_VALUE_TO_TARGET_SINGLE (rv, l);
/* If 32 bits is an entire word for the target, but not for the host,
then sign-extend on the host so that the number will look the same
way on the host that it would on the target. See for instance
simplify_unary_operation. The #if is needed to avoid compiler
warnings. */
#if HOST_BITS_PER_LONG > 32
if (BITS_PER_WORD < HOST_BITS_PER_LONG && BITS_PER_WORD == 32
&& (l & ((long) 1 << 31)))
l |= ((long) (-1) << 32);
#endif
if (BITS_PER_WORD == 16)
{
if ((i & 0x1) == !WORDS_BIG_ENDIAN)

View File

@ -3929,6 +3929,22 @@ split_double (value, first, second)
not necessarily BITS_PER_WORD bits. */
REAL_VALUE_TO_TARGET_DOUBLE (r, l);
/* If 32 bits is an entire word for the target, but not for the host,
then sign-extend on the host so that the number will look the same
way on the host that it would on the target. See for instance
simplify_unary_operation. The #if is needed to avoid compiler
warnings. */
#if HOST_BITS_PER_LONG > 32
if (BITS_PER_WORD < HOST_BITS_PER_LONG && BITS_PER_WORD == 32)
{
if (l[0] & ((long) 1 << 31))
l[0] |= ((long) (-1) << 32);
if (l[1] & ((long) 1 << 31))
l[1] |= ((long) (-1) << 32);
}
#endif
*first = GEN_INT ((HOST_WIDE_INT) l[0]);
*second = GEN_INT ((HOST_WIDE_INT) l[1]);
#else

View File

@ -558,23 +558,6 @@ endian (e, x, mode)
abort ();
}
}
/* If 32 bits is an entire word for the target, but not for the host,
then sign-extend on the host so that the number will look the same
way on the host that it would on the target. See for instance
simplify_unary_operation. The #if is needed to avoid compiler
warnings. */
#if HOST_BITS_PER_WIDE_INT > 32
if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT && BITS_PER_WORD == 32)
{
if (x[0] & ((HOST_WIDE_INT) 1 << 31))
x[0] |= ((HOST_WIDE_INT) (-1) << 32);
if (x[1] & ((HOST_WIDE_INT) 1 << 31))
x[1] |= ((HOST_WIDE_INT) (-1) << 32);
}
#endif
}