fixed bug for bit complement
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 22 Feb 2000 21:50:29 +0000 (21:50 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 22 Feb 2000 21:50:29 +0000 (21:50 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@118 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/gen.c

index 2a912fd81772d481fd74a3d8e2a3b84015adc0a7..416fa2bc9bb3af2679614e7b11c4fb9c310391e6 100644 (file)
@@ -928,10 +928,11 @@ static void aopPut (asmop *aop, char *s, int offset)
                        
                        if (strcmp(s,"a")) {
                            MOVA(s);
-                       }  
-                       emitcode("cjne","a,#0x01,%05d$",lbl->key+100);
-                       emitcode("","%05d$:",lbl->key+100);
+                       }
+                       emitcode("clr","c");
+                       emitcode("jz","%05d$",lbl->key+100);
                        emitcode("cpl","c");
+                       emitcode("","%05d$:",lbl->key+100);
                        emitcode("mov","%s,c",aop->aopu.aop_dir);
                    }
        }