summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-10 22:09:10 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-10 22:09:10 +0000
commita8b4d977b34bbe3793b6e4d2c0e6907b35037f6e (patch)
tree75d83831603917d240d2a453239b4b0485baae9c /gcc/recog.c
parentb59528b6b447f5d758ea301a8a2dd49c9f953f25 (diff)
downloadgcc-a8b4d977b34bbe3793b6e4d2c0e6907b35037f6e.tar.gz
* recog.c (offsettable_address_p): Handle LO_SUM case.
* config/mips/mips.c (double_memory_operand): Use adjust_address_nv instead of plus_constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43912 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 01bc1f3a373..26ff0302189 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1963,9 +1963,13 @@ offsettable_address_p (strictp, mode, y)
/* The offset added here is chosen as the maximum offset that
any instruction could need to add when operating on something
of the specified mode. We assume that if Y and Y+c are
- valid addresses then so is Y+d for all 0<d<c. */
-
- z = plus_constant (y, mode_sz - 1);
+ valid addresses then so is Y+d for all 0<d<c. adjust_address will
+ go inside a LO_SUM here, so we do so as well. */
+ if (GET_CODE (y) == LO_SUM)
+ z = gen_rtx_LO_SUM (GET_MODE (y), XEXP (y, 0),
+ plus_constant (XEXP (y, 1), mode_sz - 1));
+ else
+ z = plus_constant (y, mode_sz - 1);
/* Use QImode because an odd displacement may be automatically invalid
for any wider mode. But it should be valid for a single byte. */