]> git.gag.com Git - fw/sdcc/commitdiff
another small fix
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 24 Jul 2003 09:36:58 +0000 (09:36 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 24 Jul 2003 09:36:58 +0000 (09:36 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2768 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCcse.c

index a25b9f488ff8f08b525c8d12711c3f66213df829..32badbcc36cbc60151fc12144d3c66f81a96d669 100644 (file)
@@ -997,7 +997,7 @@ algebraicOpts (iCode * ic, eBBlock * ebp)
          /* if BITWISEAND then check if one of them is 0xff... */
          /* if yes turn it into assignment */
          {
-           long val;
+           unsigned val;
 
            switch (getSize (operandType (IC_RIGHT (ic))))
              {
@@ -1013,7 +1013,7 @@ algebraicOpts (iCode * ic, eBBlock * ebp)
              default:
                return;
              }
-           if (((long) operandLitValue (IC_RIGHT (ic)) & val) == val)
+           if (((unsigned) operandLitValue (IC_RIGHT (ic)) & val) == val)
            {
              ic->op = '=';
              IC_RIGHT (ic) = IC_LEFT (ic);
@@ -1065,7 +1065,7 @@ algebraicOpts (iCode * ic, eBBlock * ebp)
          /* if BITWISEOR then check if one of them is 0xff... */
          /* if yes turn it into 0xff... assignment */
          {
-           long val;
+           unsigned val;
 
            switch (getSize (operandType (IC_RIGHT (ic))))
              {
@@ -1081,7 +1081,7 @@ algebraicOpts (iCode * ic, eBBlock * ebp)
              default:
                return;
              }
-           if (((long) operandLitValue (IC_RIGHT (ic)) & val) == val)
+           if (((unsigned) operandLitValue (IC_RIGHT (ic)) & val) == val)
              {
                if (IS_OP_VOLATILE (IC_LEFT (ic)))
                {