+2007-02-09 Bernhard Held <bernhard AT bernhardheld.de>
+
+ * src/mcs51/gen.c (genRet): fixed RFE 1652561: added code for bit to
+ bit moves in return statement
+
2007-02-09 Borut Razem <borut.razem AT siol.net>
* src/SDCC.y: fixed bug #1159134: invalid duplicate declarations with
* device/lib/printf_large.c (_print_format): fixed compare/assign bug, how
can this have lived here for so many years?
* src/SDCCicode.c (ast2iCode): return left instead of right for assignment,
- fixes bug 1273984, see also patch 1645121, thanks Günther Jehle
- * support/regression/tests/bug1273984.c: new, added, thanks Günther Jehle
+ fixes bug 1273984, see also patch 1645121, thanks Gnther Jehle
+ * support/regression/tests/bug1273984.c: new, added, thanks Gnther Jehle
2007-02-06 Bernhard Held <bernhard AT bernhardheld.de>
if (IS_BIT(_G.currentFunc->etype))
{
- movc (aopGet (IC_LEFT (ic), 0, FALSE, FALSE));
- size = 0;
+ if (AOP_TYPE (IC_LEFT (ic)) == AOP_CRY)
+ emitcode ("mov", "c,%s", AOP (IC_LEFT (ic))->aopu.aop_dir);
+ else
+ movc (aopGet (IC_LEFT (ic), 0, FALSE, FALSE));
}
-
- while (size--)
+ else
{
- char *l;
- if (AOP_TYPE (IC_LEFT (ic)) == AOP_DPTR)
+ while (size--)
{
- /* #NOCHANGE */
- l = aopGet (IC_LEFT (ic), offset++,
- FALSE, TRUE);
- emitcode ("push", "%s", l);
- pushed++;
+ char *l;
+ if (AOP_TYPE (IC_LEFT (ic)) == AOP_DPTR)
+ {
+ /* #NOCHANGE */
+ l = aopGet (IC_LEFT (ic), offset++,
+ FALSE, TRUE);
+ emitcode ("push", "%s", l);
+ pushed++;
+ }
+ else
+ {
+ l = aopGet (IC_LEFT (ic), offset,
+ FALSE, FALSE);
+ if (strcmp (fReturn[offset], l))
+ emitcode ("mov", "%s,%s", fReturn[offset++], l);
+ }
}
- else
+
+ while (pushed)
{
- l = aopGet (IC_LEFT (ic), offset,
- FALSE, FALSE);
- if (strcmp (fReturn[offset], l))
- emitcode ("mov", "%s,%s", fReturn[offset++], l);
+ pushed--;
+ if (strcmp (fReturn[pushed], "a"))
+ emitcode ("pop", fReturn[pushed]);
+ else
+ emitcode ("pop", "acc");
}
}
-
- while (pushed)
- {
- pushed--;
- if (strcmp (fReturn[pushed], "a"))
- emitcode ("pop", fReturn[pushed]);
- else
- emitcode ("pop", "acc");
- }
freeAsmop (IC_LEFT (ic), NULL, ic, TRUE);
jumpret: