small improvements :(
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 25 Sep 2001 13:10:28 +0000 (13:10 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 25 Sep 2001 13:10:28 +0000 (13:10 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1310 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCicode.c
src/ds390/gen.c

index aa4af9c261f563d3bbfcaffc666e08566a6fb371..94c0a3e99dae35eeafcca98a448433928dd6e555 100644 (file)
@@ -131,7 +131,7 @@ iCodeTable codeTable[] =
      pedantic>1: "char c=200" is not allowed (evaluates to -56)
 */
 
-void checkConstantRange(sym_link *ltype, long v, char *msg, int pedantic) {
+void checkConstantRange(sym_link *ltype, double v, char *msg, int pedantic) {
   LONG_LONG max = (LONG_LONG) 1 << bitsForType(ltype);
   char message[132]="";
   int warnings=0;
@@ -2548,7 +2548,7 @@ geniCodeAssign (operand * left, operand * right, int nosupdate)
   if (IS_INTEGRAL (ltype) && right->type == VALUE && IS_LITERAL (rtype))
     {
       checkConstantRange(ltype, 
-                        (long)operandLitValue(right), "= operation", 0);
+                        operandLitValue(right), "= operation", 0);
     }
 
   /* if the left & right type don't exactly match */
index 38c748e7ff806dacd47cedc60c1a8ebed0bfdbd0..44699fdd214adb6aabc3d7df2dee12734be6efe8 100644 (file)
@@ -9491,8 +9491,7 @@ genAssign (iCode * ic)
     goto release;
 
   /* if the result is a bit */
-  // if (AOP_TYPE (result) == AOP_CRY) /* works only for true symbols */
-  if (IS_BITVAR(OP_SYMBOL(result)->type))
+  if (AOP_TYPE (result) == AOP_CRY) /* works only for true symbols */
     {
       /* if the right size is a literal then
          we know what the value is */
@@ -9624,7 +9623,8 @@ genCast (iCode * ic)
   aopOp (result, ic, FALSE, AOP_TYPE (right) == AOP_DPTR);
 
   /* if the result is a bit */
-  if (AOP_TYPE (result) == AOP_CRY)
+  // if (AOP_TYPE (result) == AOP_CRY) /* works only for true symbols */
+  if (IS_BITVAR(OP_SYMBOL(result)->type))
     {
       /* if the right size is a literal then
          we know what the value is */