OSDN Git Service

* config/sh/sh.c (sh_builtin_saveregs): Use copy_to_mode_reg
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 May 2005 21:19:19 +0000 (21:19 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 May 2005 21:19:19 +0000 (21:19 +0000)
and plus_constant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99287 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c

index 3cbd31f..e8e5775 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-05  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.
+
 2005-05-05  Aldy Hernandez  <aldyh@redhat.com>
 
        * config.gcc: Add .opt magic for the rs6000 ports.
index e5c1ded..20eddb6 100644 (file)
@@ -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;