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
This commit is contained in:
Marek Michalkiewicz 2000-10-13 19:30:15 +02:00 committed by Denis Chertykov
parent 4b9454025b
commit 08f8127676
2 changed files with 25 additions and 10 deletions

View 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.

View 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)