mips.c (mips_add_offset): Use gen_int_mode for CONST_HIGH_PART result.

* config/mips/mips.c (mips_add_offset): Use gen_int_mode for
CONST_HIGH_PART result.

From-SVN: r146995
This commit is contained in:
James E. Wilson 2009-04-30 00:58:10 +00:00 committed by Jim Wilson
parent 90adb9cbe7
commit 6d8f135b27
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -2703,8 +2703,10 @@ mips_add_offset (rtx temp, rtx reg, HOST_WIDE_INT offset)
}
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);