Commit 563c063f by Michael Meissner Committed by Michael Meissner

Fix a warning

From-SVN: r19422
parent 14bf4a33
Mon Apr 27 08:55:23 1998 Michael Meissner <meissner@cygnus.com> Mon Apr 27 08:55:23 1998 Michael Meissner <meissner@cygnus.com>
* final.c (split_double): Avoid a compiler warning if
BITS_PER_WORD is less than or equal to HOST_BIT_PER_WIDE_INT.
* rtl.h (JUMP_{CROSS_JUMP,NOOP_MOVES,AFTER_REGSCAN}): New macros * rtl.h (JUMP_{CROSS_JUMP,NOOP_MOVES,AFTER_REGSCAN}): New macros
for calling jump_optimize. for calling jump_optimize.
......
...@@ -3680,9 +3680,15 @@ split_double (value, first, second) ...@@ -3680,9 +3680,15 @@ split_double (value, first, second)
Extract the bits from it into two word-sized pieces. Extract the bits from it into two word-sized pieces.
Sign extend each half to HOST_WIDE_INT. */ Sign extend each half to HOST_WIDE_INT. */
rtx low, high; rtx low, high;
/* On machines where HOST_BITS_PER_WIDE_INT == BITS_PER_WORD
low = GEN_INT (INTVAL (value) << (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD) >> (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD)); the shift below will cause a compiler warning, even though
high = GEN_INT (INTVAL (value) << (HOST_BITS_PER_WIDE_INT - 2 * BITS_PER_WORD) >> (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD)); this code won't be executed. So put the shift amounts in
variables to avoid the warning. */
int rshift = HOST_BITS_PER_WIDE_INT - BITS_PER_WORD;
int lshift = HOST_BITS_PER_WIDE_INT - 2 * BITS_PER_WORD;
low = GEN_INT ((INTVAL (value) << rshift) >> rshift);
high = GEN_INT ((INTVAL (value) << lshift) >> rshift);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
{ {
*first = high; *first = high;
......
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