genUminusfloat avoiding 3 pairs of
authorfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 23 Feb 2003 11:26:47 +0000 (11:26 +0000)
committerfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 23 Feb 2003 11:26:47 +0000 (11:26 +0000)
inc dprtr
lcall __decdptr
for xdata variables

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2293 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/gen.c

index 1d410138230ae46647dac47c0902361390c652a3..d58f60d6bb7348ea26c5c86c03644f18ff2afce7 100644 (file)
@@ -1444,15 +1444,9 @@ genUminusFloat (operand * op, operand * result)
 
   D(emitcode (";     genUminusFloat",""));
 
-  /* for this we just need to flip the
-     first it then copy the rest in place */
-  size = AOP_SIZE (op) - 1;
-  l = aopGet (AOP (op), 3, FALSE, FALSE);
-
-  MOVA (l);
+  /* for this we just copy and then flip the bit */
 
-  emitcode ("cpl", "acc.7");
-  aopPut (AOP (result), "a", 3);
+  size = AOP_SIZE (op) - 1;
 
   while (size--)
     {
@@ -1461,6 +1455,13 @@ genUminusFloat (operand * op, operand * result)
              offset);
       offset++;
     }
+
+  l = aopGet (AOP (op), offset, FALSE, FALSE);
+
+  MOVA (l);
+
+  emitcode ("cpl", "acc.7");
+  aopPut (AOP (result), "a", offset);
 }
 
 /*-----------------------------------------------------------------*/
@@ -6519,7 +6520,7 @@ genLeftShift (iCode * ic)
   char *l;
   symbol *tlbl, *tlbl1;
 
-  D(emitcode (";    genLeftShift",""));
+  D(emitcode (";     genLeftShift",""));
 
   right = IC_RIGHT (ic);
   left = IC_LEFT (ic);