* src/ds390/gen.c (genCall): fixed a double use of acc and b after
[fw/sdcc] / src / ds390 / gen.c
index e66bfc16280a82a232c64a042cfe89fe5153f74f..979d993e9373525f442027e43f4c535d761dc278 100644 (file)
@@ -873,7 +873,7 @@ operandsEqu (operand * op1, operand * op2)
       IS_ITEMP (op1) &&
       sym2->isspilt &&
       sym1->isspilt &&
-      (sym1->usl.spillLoc == sym1->usl.spillLoc))
+      (sym1->usl.spillLoc == sym2->usl.spillLoc))
     return TRUE;
     
   return FALSE;
@@ -2675,9 +2675,16 @@ genCall (iCode * ic)
          if (size > 1)
            {
              emitcode ("mov", "b,%s", fReturn[1]);
+             _G.bInUse++;
            }
 
+         _G.accInUse++;
          aopOp (IC_RESULT (ic), ic, FALSE, FALSE);
+         _G.accInUse--;
+         
+         if (size > 1)
+           _G.bInUse--;
+
          aopPut (AOP (IC_RESULT (ic)), "a", 0);
 
          if (size > 1)