From: Marek Michalkiewicz Date: Fri, 13 Oct 2000 17:30:15 +0000 (+0200) Subject: avr.c (output_movhi, [...]): Fix loading constants 1 and 2 to NO_LD_REGS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08f812767679a5d57e95d68fc27e29cb0aa621fc;p=gcc.git avr.c (output_movhi, [...]): Fix loading constants 1 and 2 to NO_LD_REGS. * config/avr/avr.c (output_movhi, output_movsisf): Fix loading constants 1 and 2 to NO_LD_REGS. From-SVN: r36862 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f826ec3c3a3..899008330e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-10-12 Marek Michalkiewicz + + * config/avr/avr.c (output_movhi, output_movsisf): Fix loading + constants 1 and 2 to NO_LD_REGS. + 2000-10-13 Kaveh R. Ghazi * Makefile.in (c-parse.c, tradcif.c): Create atomically. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 642fccb81a3..e8926b3fa1f 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -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)