]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed bug #613775
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 17 Sep 2003 03:24:28 +0000 (03:24 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 17 Sep 2003 03:24:28 +0000 (03:24 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2894 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCopt.c

index 51ef040fc008f38b3e4d04bb55226052c03018d2..91fa0b018e538f41600ef43b12b96df309e575bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2003-09-17  Erik Petrich <epetrich@ivorytower.norman.ok.us>
 
-       * src/SDCCicode.c (cnvFromFloatCast, cnvToFloatCast): fixed
+       * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
        bug #613775
 
 2003-09-16  Erik Petrich <epetrich@ivorytower.norman.ok.us>
index ce59ec5732292088a803bdeb40f8991717c793e8..34e0e78a7a92ac95c82346bbe6ba9cf69b2ab409 100644 (file)
@@ -148,7 +148,8 @@ cnvToFcall (iCode * ic, eBBlock * ebp)
        {
          newic = newiCode (IPUSH, right, NULL);
          newic->parmPush = 1;
-         bytesPushed+=4;
+         //bytesPushed+=4;
+         bytesPushed += getSize(operandType(right));
        }
 
       addiCodeToeBBlock (ebp, newic, ip);
@@ -164,7 +165,8 @@ cnvToFcall (iCode * ic, eBBlock * ebp)
        {
          newic = newiCode (IPUSH, left, NULL);
          newic->parmPush = 1;
-         bytesPushed+=4;
+         //bytesPushed+=4;
+         bytesPushed += getSize(operandType(left));
        }
       addiCodeToeBBlock (ebp, newic, ip);
       newic->lineno = lineno;
@@ -188,6 +190,7 @@ cnvToFloatCast (iCode * ic, eBBlock * ebp)
   sym_link *type = operandType (IC_RIGHT (ic));
   int linenno = ic->lineno;
   int bwd, su;
+  int bytesPushed=0;
 
   ip = ic->next;
   /* remove it from the iCode */
@@ -236,6 +239,7 @@ found:
        {
          newic = newiCode (IPUSH, IC_RIGHT (ic), NULL);
          newic->parmPush = 1;
+         bytesPushed += getSize(operandType(IC_RIGHT(ic)));
        }
       addiCodeToeBBlock (ebp, newic, ip);
       newic->lineno = linenno;
@@ -245,6 +249,7 @@ found:
   /* make the call */
   newic = newiCode (CALL, operandFromSymbol (func), NULL);
   IC_RESULT (newic) = IC_RESULT (ic);
+  newic->parmBytes+=bytesPushed;
   addiCodeToeBBlock (ebp, newic, ip);
   newic->lineno = linenno;
 
@@ -261,6 +266,7 @@ cnvFromFloatCast (iCode * ic, eBBlock * ebp)
   sym_link *type = operandType (IC_LEFT (ic));
   int lineno = ic->lineno;
   int bwd, su;
+  int bytesPushed=0;
 
   ip = ic->next;
   /* remove it from the iCode */
@@ -310,6 +316,7 @@ found:
        {
          newic = newiCode (IPUSH, IC_RIGHT (ic), NULL);
          newic->parmPush = 1;
+         bytesPushed += getSize(operandType(IC_RIGHT(ic)));
        }
       addiCodeToeBBlock (ebp, newic, ip);
       newic->lineno = lineno;
@@ -319,6 +326,7 @@ found:
   /* make the call */
   newic = newiCode (CALL, operandFromSymbol (func), NULL);
   IC_RESULT (newic) = IC_RESULT (ic);
+  newic->parmBytes+=bytesPushed;
   addiCodeToeBBlock (ebp, newic, ip);
   newic->lineno = lineno;