This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
caller-save adjust_address fix
- From: Alan Modra <amodra at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Jun 2010 10:34:40 +0930
- Subject: caller-save adjust_address fix
This patch fixes an ICE in change_address_1 seen when a caller-save
slot is needed in a different mode to that in which it is created, and
the stack offset is too large for valid reg+offset addressing.
Refer http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44364#c38
Fairly obvious, since if no mode change is needed then we simply copy
the mem regardless of whether the offset is valid or not.
Bootstrapped etc. powerpc-linux. OK to apply?
PR target/44364
* caller-save.c (insert_restore, insert_save): Use non-validate
form of adjust_address.
Index: gcc/caller-save.c
===================================================================
--- gcc/caller-save.c (revision 160429)
+++ gcc/caller-save.c (working copy)
@@ -1212,7 +1212,7 @@ insert_restore (struct insn_chain *chain
/* Check that insn to restore REGNO in save_mode[regno] is
correct. */
&& reg_save_code (regno, save_mode[regno]) >= 0)
- mem = adjust_address (mem, save_mode[regno], 0);
+ mem = adjust_address_nv (mem, save_mode[regno], 0);
else
mem = copy_rtx (mem);
@@ -1293,7 +1293,7 @@ insert_save (struct insn_chain *chain, i
/* Check that insn to save REGNO in save_mode[regno] is
correct. */
&& reg_save_code (regno, save_mode[regno]) >= 0)
- mem = adjust_address (mem, save_mode[regno], 0);
+ mem = adjust_address_nv (mem, save_mode[regno], 0);
else
mem = copy_rtx (mem);
--
Alan Modra
Australia Development Lab, IBM