mirror of git://gcc.gnu.org/git/gcc.git
re PR middle-end/44769 (warning for split_double when HOST_BITS_PER_WIDE_INT < BITS_PER_WORD)
PR middle-end/44769 * final.c (split_double): Don't use BITS_PER_WORD directly in shift count. From-SVN: r166662
This commit is contained in:
parent
d3c176fcaf
commit
ae77ff7a03
|
@ -67,6 +67,10 @@
|
||||||
(bfin_expand_builtin): Likewise.
|
(bfin_expand_builtin): Likewise.
|
||||||
Set tmode before use.
|
Set tmode before use.
|
||||||
|
|
||||||
|
PR middle-end/44769
|
||||||
|
* final.c (split_double): Don't use BITS_PER_WORD directly in
|
||||||
|
shift count.
|
||||||
|
|
||||||
2010-11-12 Eric Botcazou <ebotcazou@adacore.com>
|
2010-11-12 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
PR debug/46375
|
PR debug/46375
|
||||||
|
|
|
@ -3807,10 +3807,11 @@ split_double (rtx value, rtx *first, rtx *second)
|
||||||
Sign extend each half to HOST_WIDE_INT. */
|
Sign extend each half to HOST_WIDE_INT. */
|
||||||
unsigned HOST_WIDE_INT low, high;
|
unsigned HOST_WIDE_INT low, high;
|
||||||
unsigned HOST_WIDE_INT mask, sign_bit, sign_extend;
|
unsigned HOST_WIDE_INT mask, sign_bit, sign_extend;
|
||||||
|
unsigned bits_per_word = BITS_PER_WORD;
|
||||||
|
|
||||||
/* Set sign_bit to the most significant bit of a word. */
|
/* Set sign_bit to the most significant bit of a word. */
|
||||||
sign_bit = 1;
|
sign_bit = 1;
|
||||||
sign_bit <<= BITS_PER_WORD - 1;
|
sign_bit <<= bits_per_word - 1;
|
||||||
|
|
||||||
/* Set mask so that all bits of the word are set. We could
|
/* Set mask so that all bits of the word are set. We could
|
||||||
have used 1 << BITS_PER_WORD instead of basing the
|
have used 1 << BITS_PER_WORD instead of basing the
|
||||||
|
@ -3833,7 +3834,7 @@ split_double (rtx value, rtx *first, rtx *second)
|
||||||
/* Pick the higher word, shifted to the least significant
|
/* Pick the higher word, shifted to the least significant
|
||||||
bits, and sign-extend it. */
|
bits, and sign-extend it. */
|
||||||
high = INTVAL (value);
|
high = INTVAL (value);
|
||||||
high >>= BITS_PER_WORD - 1;
|
high >>= bits_per_word - 1;
|
||||||
high >>= 1;
|
high >>= 1;
|
||||||
high &= mask;
|
high &= mask;
|
||||||
if (high & sign_bit)
|
if (high & sign_bit)
|
||||||
|
|
Loading…
Reference in New Issue