summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-23 15:38:29 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-23 15:38:29 +0000
commitd938b513baec49eaddfb679d973a37f0341ee090 (patch)
tree524b6fbfc522c5fc6aa1cb518903cbbafd118a73
parent48694fc0bcb705daf70c22d5e3d836ee90b0685a (diff)
downloadppe42-gcc-d938b513baec49eaddfb679d973a37f0341ee090.tar.gz
ppe42-gcc-d938b513baec49eaddfb679d973a37f0341ee090.zip
* reload.c (find_reloads_address_1) <autoincdec cases>:
Call REG_OK_FOR_CONTEXT with the autoincdec code, not outer_code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130380 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/reload.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 687c8b63dec..730dec33329 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * reload.c (find_reloads_address_1) <autoincdec cases>:
+ Call REG_OK_FOR_CONTEXT with the autoincdec code, not
+ outer_code.
+
2007-11-23 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de>
diff --git a/gcc/reload.c b/gcc/reload.c
index fd791b2d57f..e80ae122a77 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5676,8 +5676,10 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
}
}
- /* If we have a hard register that is ok as an index,
- don't make a reload. If an autoincrement of a nice register
+ /* If we have a hard register that is ok in this incdec context,
+ don't make a reload. If the register isn't nice enough for
+ autoincdec, we can reload it. But, if an autoincrement of a
+ register that we here verified as playing nice, still outside
isn't "valid", it must be that no autoincrement is "valid".
If that is true and something made an autoincrement anyway,
this must be a special context where one is allowed.
@@ -5690,7 +5692,7 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context,
if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno];
if (regno >= FIRST_PSEUDO_REGISTER
- || !REG_OK_FOR_CONTEXT (context, regno, mode, outer_code,
+ || !REG_OK_FOR_CONTEXT (context, regno, mode, code,
index_code))
{
int reloadnum;
OpenPOWER on IntegriCloud