This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] SH: Bootstrap failure

Richard Henderson <> 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?

2005-05-04  Richard Henderson  <>
	    Kaz Kojima  <>

	* 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)));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]