From: johanknol Date: Fri, 26 Oct 2001 12:25:46 +0000 (+0000) Subject: fixed a optimizer bug for longs X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6aa35dad503811a9004b0a4b82ecbe231d57ab60;p=fw%2Fsdcc fixed a optimizer bug for longs git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1445 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/ds390/ralloc.c b/src/ds390/ralloc.c index 57fb46cd..40bc1c86 100644 --- a/src/ds390/ralloc.c +++ b/src/ds390/ralloc.c @@ -1897,13 +1897,15 @@ packRegsForOneuse (iCode * ic, operand * op, eBBlock * ebp) /* only upto 2 bytes since we cannot predict the usage of b, & acc */ - if (getSize (operandType (op)) > (fReturnSizeDS390 - 2) && - ic->op != RETURN && + if (getSize (operandType (op)) > (fReturnSizeDS390 - 2)) + return 0; + + if (ic->op != RETURN && ic->op != SEND && !POINTER_SET (ic) && !POINTER_GET (ic)) return NULL; - + /* this routine will mark the a symbol as used in one instruction use only && if the defintion is local (ie. within the basic block) && has only one definition && diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 40043820..bcb0fa36 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1875,13 +1875,15 @@ packRegsForOneuse (iCode * ic, operand * op, eBBlock * ebp) /* only upto 2 bytes since we cannot predict the usage of b, & acc */ - if (getSize (operandType (op)) > (fReturnSizeMCS51 - 2) && - ic->op != RETURN && + if (getSize (operandType (op)) > (fReturnSizeMCS51 - 2)) + return NULL; + + if (ic->op != RETURN && ic->op != SEND && !POINTER_SET (ic) && !POINTER_GET (ic)) return NULL; - + /* this routine will mark the a symbol as used in one instruction use only && if the defintion is local (ie. within the basic block) && has only one definition &&