Commit 6d8f135b by James E. Wilson Committed by Jim Wilson

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
parent 90adb9cb
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> 2009-04-29 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.c (initial_elimination_offset): Rename to * config/avr/avr.c (initial_elimination_offset): Rename to
......
...@@ -2703,8 +2703,10 @@ mips_add_offset (rtx temp, rtx reg, HOST_WIDE_INT offset) ...@@ -2703,8 +2703,10 @@ mips_add_offset (rtx temp, rtx reg, HOST_WIDE_INT offset)
} }
else else
{ {
/* Leave OFFSET as a 16-bit offset and put the excess in HIGH. */ /* Leave OFFSET as a 16-bit offset and put the excess in HIGH.
high = GEN_INT (CONST_HIGH_PART (offset)); 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); offset = CONST_LOW_PART (offset);
} }
high = mips_force_temporary (temp, high); high = mips_force_temporary (temp, 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