fixed the bit to int cast
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 1 Aug 2001 07:50:06 +0000 (07:50 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 1 Aug 2001 07:50:06 +0000 (07:50 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1118 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/gen.c

index 2e64ad217e74c22bcd17e242335d0037e832bef2..78725f19686023b03b2396b8423ef8041c9ed76c 100644 (file)
@@ -1003,7 +1003,7 @@ aopPut (asmop * aop, char *s, int offset)
                }
              {
                symbol *lbl = newiTempLabel (NULL);
-               emitcode ("clr", "c");
+               emitcode ("clr", "c; oops");
                emitcode ("jz", "%05d$", lbl->key + 100);
                emitcode ("cpl", "c");
                emitcode ("", "%05d$:", lbl->key + 100);
@@ -8299,7 +8299,7 @@ genCast (iCode * ic)
   /* now depending on the sign of the source && destination */
   size = AOP_SIZE (result) - AOP_SIZE (right);
   /* if unsigned or not an integral type */
-  if (SPEC_USIGN (rtype) || !IS_SPEC (rtype))
+  if (SPEC_USIGN (rtype) || !IS_SPEC (rtype) || AOP_TYPE(right)==AOP_CRY)
     {
       while (size--)
        aopPut (AOP (result), zero, offset++);