This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
another reload fix for SH
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Subject: another reload fix for SH
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 15 Aug 2001 16:28:00 +0200
Hi,
this patch solves the sh newlib build failure. As I've bugreported earlier, merge_assigned_reloads
calls reg_overlap_mentioned_for_reload_p with first operand being address reloaded.
The function expects just simple objects (memory, register, constant etc.) and crashes.
Proper fix appears to be to avoid attempts to combine with addresses, as the
code does not appear to be designed for such trick.
I am regtesting/bootstrapping the patch on i386 together with previous fix.
Honza
Wed Aug 15 16:25:28 CEST 2001 Jan Hubicka <jh@suse.cz>
* reload1.c (merge_assigned_reloads): Do not attempt to merge addresses.
Index: reload1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload1.c,v
retrieving revision 1.286
diff -c -3 -p -r1.286 reload1.c
*** reload1.c 2001/08/13 15:52:21 1.286
--- reload1.c 2001/08/15 14:24:59
*************** merge_assigned_reloads (insn)
*** 6075,6080 ****
--- 6075,6082 ----
for (j = 0; j < n_reloads; j++)
if (rld[j].in != 0
&& rld[j].when_needed != RELOAD_OTHER
+ && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
+ && rld[j].when_needed != RELOAD_FOR_INPUT_ADDRESS
&& reg_overlap_mentioned_for_reload_p (rld[j].in,
rld[i].in))
rld[j].when_needed