Commit 48b4d901 by Alexandre Oliva Committed by Alexandre Oliva

combine.c (try_combine): Fix SUBREG setting for HOST_BITS_PER_WIDE_INT >= 2 * BITS_PER_WORD.

* combine.c (try_combine): Fix SUBREG setting for
HOST_BITS_PER_WIDE_INT >= 2 * BITS_PER_WORD.

From-SVN: r39355
parent cab1f90a
2001-01-30 Alexandre Oliva <aoliva@redhat.com>
* combine.c (try_combine): Fix SUBREG setting for
HOST_BITS_PER_WIDE_INT >= 2 * BITS_PER_WORD.
2001-01-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 2001-01-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* jump.c (comparison_dominates_p): Don't try to handle UNKNOWN * jump.c (comparison_dominates_p): Don't try to handle UNKNOWN
......
...@@ -1661,9 +1661,32 @@ try_combine (i3, i2, i1, new_direct_jump_p) ...@@ -1661,9 +1661,32 @@ try_combine (i3, i2, i1, new_direct_jump_p)
} }
if (subreg_lowpart_p (SET_DEST (PATTERN (i3)))) if (subreg_lowpart_p (SET_DEST (PATTERN (i3))))
lo = INTVAL (SET_SRC (PATTERN (i3))); {
else /* We don't handle the case of the target word being wider
than a host wide int. */
if (HOST_BITS_PER_WIDE_INT < BITS_PER_WORD)
abort ();
lo &= ~(((unsigned HOST_WIDE_INT)1 << BITS_PER_WORD) - 1);
lo |= INTVAL (SET_SRC (PATTERN (i3)));
}
else if (HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
hi = INTVAL (SET_SRC (PATTERN (i3))); hi = INTVAL (SET_SRC (PATTERN (i3)));
else if (HOST_BITS_PER_WIDE_INT >= 2 * BITS_PER_WORD)
{
int sign = -(int) ((unsigned HOST_WIDE_INT) lo
>> (HOST_BITS_PER_WIDE_INT - 1));
lo &= ~((((unsigned HOST_WIDE_INT)1 << BITS_PER_WORD) - 1)
<< BITS_PER_WORD);
lo |= INTVAL (SET_SRC (PATTERN (i3))) << BITS_PER_WORD;
if (hi == sign)
hi = lo < 0 ? -1 : 0;
}
else
/* We don't handle the case of the higher word not fitting
entirely in either hi or lo. */
abort ();
combine_merges++; combine_merges++;
subst_insn = i3; subst_insn = i3;
......
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