Optimise bit assignment
[fw/sdcc] / src / mcs51 / gen.c
index 09e259908d88ac44133cd9c0b21cd639db0a4b91..718a1ccab42519c177afb3b8b1505847e7052c0d 100644 (file)
@@ -1046,11 +1046,8 @@ aopPut (asmop * aop, char *s, int offset)
                  MOVA (s);
                }
              {
-               symbol *lbl = newiTempLabel (NULL);
-               emitcode ("clr", "c");
-               emitcode ("jz", "%05d$", lbl->key + 100);
-               emitcode ("cpl", "c");
-               emitcode ("", "%05d$:", lbl->key + 100);
+               /* set C, if a >= 1 */
+                emitcode ("add", "a,#0xff");
                emitcode ("mov", "%s,c", aop->aopu.aop_dir);
              }
            }