+2008-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * src/mcs51/gen.c (pushSide, genPcall): fixed bug 1908493
+ * src/SDCCmain.c (preProcess): removed -DSDCC_PARMS_IN_BANK1 because it is
+ already set in ds390/main.c and mcs51/main.c
+
2008-03-07 Raphael Neider <rneider AT web.de>
* src/regression/init0.c: new test for initialized arrays of function
2008-03-05 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
- * support/librarian/sdcclib.c:Added feature request 1908061:
+ * support/librarian/sdcclib.c:Added feature request 1908061:
Synchronise sdcclib commands with ar.
2008-03-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
/*-----------------------------------------------------------------*/
/* freeAsmop - free up the asmop given to an operand */
-/*----------------------------------------------------------------*/
+/*-----------------------------------------------------------------*/
static void
freeAsmop (operand * op, asmop * aaop, iCode * ic, bool pop)
{
/* pushSide - */
/*-----------------------------------------------------------------*/
static void
-pushSide (operand * oper, int size)
+pushSide (operand * oper, int size, iCode * ic)
{
int offset = 0;
+ int nPushed = _G.r0Pushed + _G.r1Pushed;
+
+ aopOp (oper, ic, FALSE);
+
+ if (nPushed != _G.r0Pushed + _G.r1Pushed)
+ {
+ while (offset < size)
+ {
+ char *l = aopGet (oper, offset, FALSE, TRUE);
+ emitcode ("mov", "%s,%s", fReturn[offset++], l);
+ }
+ freeAsmop (oper, NULL, ic, TRUE);
+ offset = 0;
+ while (offset < size)
+ {
+ emitcode ("push", "%s", fReturn[offset++]);
+ }
+ return;
+ }
+
while (size--)
{
char *l = aopGet (oper, offset++, FALSE, TRUE);
emitcode ("push", "%s", l);
}
}
+
+ freeAsmop (oper, NULL, ic, TRUE);
}
/*-----------------------------------------------------------------*/
emitcode ("push", "acc");
/* now push the calling address */
- aopOp (IC_LEFT (ic), ic, FALSE);
-
- pushSide (IC_LEFT (ic), FPTRSIZE);
-
- freeAsmop (IC_LEFT (ic), NULL, ic, TRUE);
+ pushSide (IC_LEFT (ic), FPTRSIZE, ic);
- /* if send set is not empty the assign */
+ /* if send set is not empty then assign */
if (_G.sendSet)
{
genSend(reverseSet(_G.sendSet));