aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>1996-02-14 18:45:05 +0000
committerDavid Edelsohn <edelsohn@gnu.org>1996-02-14 18:45:05 +0000
commite8d791dd5551e3b3458286ab23c8b2d280afc560 (patch)
tree38529f3d9488abe29b5e60440952a85617ef2f39 /gcc
parentf4558646ab00394c87c5a86713acfd9911108e26 (diff)
downloadgcc-e8d791dd5551e3b3458286ab23c8b2d280afc560.zip
gcc-e8d791dd5551e3b3458286ab23c8b2d280afc560.tar.gz
gcc-e8d791dd5551e3b3458286ab23c8b2d280afc560.tar.bz2
fix_truncdfsi2 SUBREG and movdi HOST_BITS_PER_WIDE_INT test
From-SVN: r11274
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 4e870c9..f3476bd 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))