Commit e8d791dd by David Edelsohn

fix_truncdfsi2 SUBREG and movdi HOST_BITS_PER_WIDE_INT test

From-SVN: r11274
parent f4558646
......@@ -3527,14 +3527,13 @@
{
if (TARGET_POWER2 || TARGET_POWERPC)
{
int endian = (WORDS_BIG_ENDIAN == 0);
rtx stack_slot = rs6000_stack_temp (DImode, 8, 1);
rtx temp = gen_reg_rtx (DImode);
emit_insn (gen_fpcvtsi (temp, operands[1]));
emit_move_insn (stack_slot, temp);
emit_move_insn (operands[0],
operand_subword (stack_slot, 1 - endian, 0, DImode));
gen_rtx (SUBREG, SImode, stack_slot, WORDS_BIG_ENDIAN));
DONE;
}
else
......@@ -5322,16 +5321,18 @@
low = CONST_DOUBLE_LOW (operands[1]);
high = CONST_DOUBLE_HIGH (operands[1]);
}
else if (HOST_BITS_PER_WIDE_INT <= 32)
else
#if HOST_BITS_PER_WIDE_INT == 32
{
low = INTVAL (operands[1]);
high = (low < 0) ? ~0 : 0;
}
else
#else
{
low = INTVAL (operands[1]) & 0xffffffff;
high = (HOST_WIDE_INT) INTVAL (operands[1]) >> 32;
}
#endif
if (! TARGET_POWERPC64)
{
......@@ -5479,16 +5480,18 @@
low = CONST_DOUBLE_LOW (operands[1]);
high = CONST_DOUBLE_HIGH (operands[1]);
}
else if (HOST_BITS_PER_WIDE_INT <= 32)
else
#if HOST_BITS_PER_WIDE_INT == 32
{
low = INTVAL (operands[1]);
high = (low < 0) ? ~0 : 0;
}
else
#else
{
low = INTVAL (operands[1]) & 0xffffffff;
high = (HOST_WIDE_INT) INTVAL (operands[1]) >> 32;
}
#endif
if ((high + 0x8000) < 0x10000
&& ((low & 0xffff) == 0 || (low & (~ (HOST_WIDE_INT) 0xffff)) == 0))
......
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