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
This commit is contained in:
Eric Botcazou 2015-02-04 22:37:16 +00:00 committed by Eric Botcazou
parent 4886ec8e70
commit a6bc87d334
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -3925,12 +3925,12 @@ legitimate_pic_operand_p (rtx x)
#define RTX_OK_FOR_OFFSET_P(X, MODE) \
(CONST_INT_P (X) \
&& 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) \
(CONST_INT_P (X) \
&& 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.