This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH/RFC] PR target/18511: Cross build failure on sh4-unknown-linux-gnu
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org, aoliva at redhat dot com
- Date: Tue, 16 Nov 2004 13:24:33 +0000
- Subject: Re: [PATCH/RFC] PR target/18511: Cross build failure on sh4-unknown-linux-gnu
- References: <email@example.com>
Kaz Kojima wrote:
Hi,I think this patch is safe. The code in question, although originally
The appended patch is to avoid the failure described in
which is preventing x86 cross sh4-unknown-linux-gnu builds since
Oct 29. I hope that the experts will comment about this because
the reload is beyond my powers.
Anyway, the patch is tested with bootstraps on i686-linux and
sh4-unknown-linux-gnu without new regressions.
2004-11-16 Kaz Kojima <firstname.lastname@example.org>
* reload1.c (emit_output_reload_insns): Check if OLD is a hard
register before calling regno_clobbered_p.
diff -uprN ORIG/gcc/gcc/reload1.c LOCAL/gcc/gcc/reload1.c
--- ORIG/gcc/gcc/reload1.c 2004-11-13 10:52:51.000000000 +0900
+++ LOCAL/gcc/gcc/reload1.c 2004-11-16 09:57:11.000000000 +0900
@@ -6706,7 +6706,8 @@ emit_output_reload_insns (struct insn_ch
|| !(set = single_set (insn))
|| rtx_equal_p (old, SET_DEST (set))
|| !reg_mentioned_p (old, SET_SRC (set))
- || !regno_clobbered_p (REGNO (old), insn, rl->mode, 0))
+ || !((REGNO (old) < FIRST_PSEUDO_REGISTER)
+ && regno_clobbered_p (REGNO (old), insn, rl->mode, 0)))
gen_reload (old, reloadreg, rl->opnum,
as a fix to paper over an i386.md, was accepted only as an optimization
after the i386.md bug was fixed. So the safe thing to do is to emit the
See: http://gcc.gnu.org/ml/gcc/1998-05/msg00297.html .
To give some background on what kind of reloads we are dealing with here:
The first three tests will cover most normal reloads, but not some SUBREG
destinations where the entire hard rregister / word of the pseudo is
or auto-increment reloads. Auto-increment reloads will be either for a hard
register of the wrong class, or a pseudo register. In particular, for
the SH family,
auto-increment reloads for pseudo registers happen from time to time.