This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] SH: Bootstrap failure
Richard Henderson <rth@redhat.com> wrote:
> Ok, the original bug is here:
>
> #5 0x0849233f in sh_builtin_saveregs ()
> 6252 emit_move_insn (fpregs, XEXP (regbuf, 0));
>
> This is not a valid way to move an address into a register.
> You need to do
>
> emit_move_insn (fpregs, force_operand (XEXP (regbuf, 0), NULL));
>
> The new instantiation pass is a lot less forgiving about mistakes
> that cause invalid rtl to be created during rtl expansion.
Thanks for taking a look at this problem. The patch you suggested
gets rid of the SH build failure. Can I apply the attached patch
after the bootstrap and the usual test are done?
Regards,
kaz
--
2005-05-04 Richard Henderson <rth@redhat.com>
Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_builtin_saveregs): Use force_operand.
diff -uprN ORIG/gcc/gcc/config/sh/sh.c LOCAL/gcc/gcc/config/sh/sh.c
--- ORIG/gcc/gcc/config/sh/sh.c 2005-04-24 22:52:33.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.c 2005-05-04 17:41:34.000000000 +0900
@@ -6249,7 +6249,7 @@ sh_builtin_saveregs (void)
We emit the moves in reverse order so that we can use predecrement. */
fpregs = gen_reg_rtx (Pmode);
- emit_move_insn (fpregs, XEXP (regbuf, 0));
+ emit_move_insn (fpregs, force_operand (XEXP (regbuf, 0), NULL));
emit_insn (gen_addsi3 (fpregs, fpregs,
GEN_INT (n_floatregs * UNITS_PER_WORD)));
if (TARGET_SH4 || TARGET_SH2A_DOUBLE)