]> gcc.gnu.org Git - gcc.git/commitdiff
avr.c (output_movhi, [...]): Fix loading constants 1 and 2 to NO_LD_REGS.
authorMarek Michalkiewicz <marekm@linux.org.pl>
Fri, 13 Oct 2000 17:30:15 +0000 (19:30 +0200)
committerDenis Chertykov <denisc@gcc.gnu.org>
Fri, 13 Oct 2000 17:30:15 +0000 (21:30 +0400)
* config/avr/avr.c (output_movhi, output_movsisf): Fix loading
constants 1 and 2 to NO_LD_REGS.

From-SVN: r36862

gcc/ChangeLog
gcc/config/avr/avr.c

index f826ec3c3a36b925d20a8537c589235e3f29b6ba..899008330e0a17b5a7e411208065e4d331f833aa 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-12  Marek Michalkiewicz  <marekm@linux.org.pl>
+
+       * config/avr/avr.c (output_movhi, output_movsisf): Fix loading
+       constants 1 and 2 to NO_LD_REGS.
+
 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * Makefile.in (c-parse.c, tradcif.c): Create atomically.
index 642fccb81a34dbb8ddc802ea5550ff29274f90ff..e8926b3fa1fa785861496e08c6ea6446f99b751b 100644 (file)
@@ -1616,9 +1616,10 @@ output_movhi (insn, operands, l)
                      return AS1 (inc,%0 ; reg_was_0);
                    }
 
-                 *l = 2;
-                 return (AS1 (clr,%0) CR_TAB
-                         AS1 (inc,%0));
+                 *l = 3;
+                 return (AS1 (clr,%A0) CR_TAB
+                         AS1 (clr,%B0) CR_TAB
+                         AS1 (inc,%A0));
                }
              else if (src == const2_rtx)
                {
@@ -1629,10 +1630,11 @@ output_movhi (insn, operands, l)
                              AS1 (inc,%0));
                    }
 
-                 *l = 3;
-                 return (AS1 (clr,%0) CR_TAB
-                         AS1 (inc,%0) CR_TAB
-                         AS1 (inc,%0));
+                 *l = 4;
+                 return (AS1 (clr,%A0) CR_TAB
+                         AS1 (clr,%B0) CR_TAB
+                         AS1 (inc,%A0) CR_TAB
+                         AS1 (inc,%A0));
                }
              else if (src == constm1_rtx)
                {
@@ -2280,11 +2282,19 @@ output_movsisf(insn, operands, l)
                      *l = 1;
                      return AS1 (inc,%A0 ; reg_was_0);
                    }
-
-                 *l = 4;
-                 return (AS1 (clr,%D0) CR_TAB
+                 if (AVR_ENHANCED)
+                   {
+                     *l = 4;
+                     return (AS1 (clr,%A0) CR_TAB
+                             AS1 (clr,%B0) CR_TAB
+                             AS2 (movw,%C0,%A0) CR_TAB
+                             AS1 (inc,%A0));
+                   }
+                 *l = 5;
+                 return (AS1 (clr,%A0) CR_TAB
                          AS1 (clr,%B0) CR_TAB
                          AS1 (clr,%C0) CR_TAB
+                         AS1 (clr,%D0) CR_TAB
                          AS1 (inc,%A0));
                }
              else if (src == const2_rtx)
This page took 0.071876 seconds and 5 git commands to generate.