* config/mips/mips.c (mips_add_offset): Use gen_int_mode for
CONST_HIGH_PART result.
From-SVN: r146995
+2009-04-29 James E. Wilson <wilson@codesourcery.com>
+
+ * config/mips/mips.c (mips_add_offset): Use gen_int_mode for
+ CONST_HIGH_PART result.
+
2009-04-29 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.c (initial_elimination_offset): Rename to
}
else
{
- /* Leave OFFSET as a 16-bit offset and put the excess in HIGH. */
- high = GEN_INT (CONST_HIGH_PART (offset));
+ /* Leave OFFSET as a 16-bit offset and put the excess in HIGH.
+ The addition inside the macro CONST_HIGH_PART may cause an
+ overflow, so we need to force a sign-extension check. */
+ high = gen_int_mode (CONST_HIGH_PART (offset), Pmode);
offset = CONST_LOW_PART (offset);
}
high = mips_force_temporary (temp, high);