From: David Edelsohn Date: Wed, 14 Feb 1996 18:45:05 +0000 (+0000) Subject: fix_truncdfsi2 SUBREG and movdi HOST_BITS_PER_WIDE_INT test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8d791dd5551e3b3458286ab23c8b2d280afc560;p=gcc.git fix_truncdfsi2 SUBREG and movdi HOST_BITS_PER_WIDE_INT test From-SVN: r11274 --- diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 4e870c92d17..f3476bd5489 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -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))