split PIC port gen.c pcodepeep.c into smaller files. Added structure support.
[fw/sdcc] / src / SDCCicode.c
index 1fd75b1164910b3b3b713035c1a7d94c7b993a73..84c6123f18fc43e1c0fb103b1c3479253b47ce11 100644 (file)
@@ -1690,7 +1690,7 @@ geniCodeMultiply (operand * left, operand * right,int resultIsInt)
 {
   iCode *ic;
   int p2 = 0;
-  int saveOption;
+  int saveOption=0;
   sym_link *resType;
   LRTYPE;
 
@@ -1861,7 +1861,7 @@ geniCodeSubtract (operand * left, operand * right)
     {
       isarray = left->isaddr;
       right = geniCodeMultiply (right,
-                               operandFromLit (getSize (ltype->next)), (getArraySizePtr(left) == INTSIZE));
+                               operandFromLit (getSize (ltype->next)), (getArraySizePtr(left) >= INTSIZE));
       resType = copyLinkChain (IS_ARRAY (ltype) ? ltype->next : ltype);
     }
   else
@@ -1912,7 +1912,7 @@ geniCodeAdd (operand * left, operand * right)
     {
       isarray = left->isaddr;
       size  =  operandFromLit (getSize (ltype->next));
-      right = geniCodeMultiply (right, size, (getArraySizePtr(left) == INTSIZE));
+      right = geniCodeMultiply (right, size, (getArraySizePtr(left) >= INTSIZE));
       resType = copyLinkChain (ltype);
     }
   else
@@ -2020,7 +2020,7 @@ geniCodeArray (operand * left, operand * right)
     }
 
   right = geniCodeMultiply (right,
-                           operandFromLit (getSize (ltype->next)), (getArraySizePtr(left) == INTSIZE));
+                           operandFromLit (getSize (ltype->next)), (getArraySizePtr(left) >= INTSIZE));
 
   /* we can check for limits here */
   if (isOperandLiteral (right) &&