diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-02-04 22:37:16 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-02-04 22:37:16 +0000 |
commit | a6bc87d334fa5eed69acda9813cbf369dcdf9cf2 (patch) | |
tree | 318064b2678d6a687eeb3758f5d22718c8447b0c | |
parent | 4886ec8e709d547391d199bd88579d0f523f4e2d (diff) | |
download | gcc-a6bc87d334fa5eed69acda9813cbf369dcdf9cf2.zip gcc-a6bc87d334fa5eed69acda9813cbf369dcdf9cf2.tar.gz gcc-a6bc87d334fa5eed69acda9813cbf369dcdf9cf2.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a513fc..9554bcd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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. 2015-02-04 Jan Hubicka <hubicka@ucw.cz> diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 0cf2649..3484809 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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. |