Commit a6bc87d3 by Eric Botcazou Committed by Eric Botcazou

sparc.c (RTX_OK_FOR_OFFSET_P): Fix off-by-one error.

	* config/sparc/sparc.c (RTX_OK_FOR_OFFSET_P): Fix off-by-one error.
	(RTX_OK_FOR_OLO10_P): Likewise.

From-SVN: r220421
parent 4886ec8e
2015-02-04 Eric Botcazou <ebotcazou@adacore.com> 2015-02-04 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (RTX_OK_FOR_OFFSET_P): Fix off-by-one error.
(RTX_OK_FOR_OLO10_P): Likewise.
2015-02-04 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-loop-ivopts.c (get_address_cost): Use right mode for offset. * tree-ssa-loop-ivopts.c (get_address_cost): Use right mode for offset.
2015-02-04 Jan Hubicka <hubicka@ucw.cz> 2015-02-04 Jan Hubicka <hubicka@ucw.cz>
......
...@@ -3925,12 +3925,12 @@ legitimate_pic_operand_p (rtx x) ...@@ -3925,12 +3925,12 @@ legitimate_pic_operand_p (rtx x)
#define RTX_OK_FOR_OFFSET_P(X, MODE) \ #define RTX_OK_FOR_OFFSET_P(X, MODE) \
(CONST_INT_P (X) \ (CONST_INT_P (X) \
&& INTVAL (X) >= -0x1000 \ && INTVAL (X) >= -0x1000 \
&& INTVAL (X) < (0x1000 - GET_MODE_SIZE (MODE))) && INTVAL (X) <= (0x1000 - GET_MODE_SIZE (MODE)))
#define RTX_OK_FOR_OLO10_P(X, MODE) \ #define RTX_OK_FOR_OLO10_P(X, MODE) \
(CONST_INT_P (X) \ (CONST_INT_P (X) \
&& INTVAL (X) >= -0x1000 \ && INTVAL (X) >= -0x1000 \
&& INTVAL (X) < (0xc00 - GET_MODE_SIZE (MODE))) && INTVAL (X) <= (0xc00 - GET_MODE_SIZE (MODE)))
/* Handle the TARGET_LEGITIMATE_ADDRESS_P target hook. /* Handle the TARGET_LEGITIMATE_ADDRESS_P target hook.
......
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