Commit 5a1a6efd by Richard Kenner

(split_double): Handle CONST_INT that holds both words.

From-SVN: r9028
parent 8c35bbc5
......@@ -2846,6 +2846,32 @@ split_double (value, first, second)
{
if (GET_CODE (value) == CONST_INT)
{
if (HOST_BITS_PER_WIDE_INT >= (2 * BITS_PER_WORD))
{
/* In this case the CONST_INT holds both target words.
Extract the bits from it into two word-sized pieces. */
rtx low, high;
HOST_WIDE_INT word_mask;
/* Avoid warnings for shift count >= BITS_PER_WORD. */
int shift_count = BITS_PER_WORD - 1;
word_mask = (HOST_WIDE_INT) 1 << shift_count;
word_mask |= word_mask - 1;
low = GEN_INT (INTVAL (value) & word_mask);
high = GEN_INT ((INTVAL (value) >> (shift_count + 1)) & word_mask);
if (WORDS_BIG_ENDIAN)
{
*first = high;
*second = low;
}
else
{
*first = low;
*second = high;
}
}
else
{
/* The rule for using CONST_INT for a wider mode
is that we regard the value as signed.
So sign-extend it. */
......@@ -2861,6 +2887,7 @@ split_double (value, first, second)
*second = high;
}
}
}
else if (GET_CODE (value) != CONST_DOUBLE)
{
if (WORDS_BIG_ENDIAN)
......
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