tiny improvement to genRet
authorkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 11 May 2001 16:38:00 +0000 (16:38 +0000)
committerkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 11 May 2001 16:38:00 +0000 (16:38 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@803 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/gen.c

index e2609d6b21f3e8a5a62dd735657a2172215d8758..8868a878c513c27c9ca37d1b6bdabaae2cae148a 100644 (file)
@@ -2843,10 +2843,15 @@ genRet (iCode * ic)
        }
       else
        {
+         /* Since A is the last element of fReturn,
+          * it is OK to clobber it in the aopGet.
+          */
          l = aopGet (AOP (IC_LEFT (ic)), offset,
-                     FALSE, FALSE, FALSE);
+                     FALSE, FALSE, TRUE);
          if (strcmp (fReturn[offset], l))
+         {
            emitcode ("mov", "%s,%s", fReturn[offset++], l);
+         }
        }
     }
   _endLazyDPSEvaluation ();