This is the mail archive of the gcc-patches@gcc.gnu.org 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


Joern RENNECKE <joern.rennecke@st.com> wrote:
> copy_to_mode_reg has this code:
> 
>   /* If not an operand, must be an address with PLUS and MULT so
>      do the computation.  */
>   if (! general_operand (x, VOIDmode))
>     x = force_operand (x, temp);

Is the patch below ok for mailine and sh-elf-4_1 branch after
the usual test is done?

Regards,
	kaz
--
2005-05-04  J"orn Rennecke <joern.rennecke@st.com>
	    Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/sh.c (sh_builtin_saveregs): Use copy_to_mode_reg
	and plus_constant.

diff -up 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-05 07:11:46.949026520 +0900
@@ -6248,10 +6248,9 @@ sh_builtin_saveregs (void)
      saved).
      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_insn (gen_addsi3 (fpregs, fpregs,
-			 GEN_INT (n_floatregs * UNITS_PER_WORD)));
+  fpregs = copy_to_mode_reg (Pmode,
+			     plus_constant (XEXP (regbuf, 0),
+                                            n_floatregs * UNITS_PER_WORD));
   if (TARGET_SH4 || TARGET_SH2A_DOUBLE)
     {
       rtx mem;


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