fixed fig #471059
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 3 Nov 2001 10:21:43 +0000 (10:21 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 3 Nov 2001 10:21:43 +0000 (10:21 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1492 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/gen.c
src/mcs51/ralloc.c

index 0e6d7091fd9a75b274eefdaf66445b93c43ebc8e..76add3aa6d678874add2bc7443cee8676bb652e0 100644 (file)
@@ -3420,14 +3420,20 @@ genMult (iCode * ic)
     }
 
   /* if both are of size == 1 */
-  if (AOP_SIZE (left) == 1 &&
-      AOP_SIZE (right) == 1)
+#if 0 // one of them can be a sloc shared with the result
+    if (AOP_SIZE (left) == 1 && AOP_SIZE (right) == 1)
+#else
+  if (getSize(operandType(left)) == 1 && 
+      getSize(operandType(right)) == 1)
+#endif
     {
       genMultOneByte (left, right, result);
       goto release;
     }
 
   /* should have been converted to function call */
+    fprintf (stderr, "left: %d right: %d\n", getSize(OP_SYMBOL(left)->type),
+            getSize(OP_SYMBOL(right)->type));
   assert (0);
 
 release:
index bcb0fa3686c7f01d8e6890c4fbb6923393973719..a6a346418fd86a631f27437c31bf05ae3f83762b 100644 (file)
@@ -1182,10 +1182,15 @@ serialRegAssign (eBBlock ** ebbs, int count)
                    else
                        sym->regs[j] = getRegGpr (ic, ebbs[i], sym);
 
-                   /* if the allocation falied which means
+                   /* if the allocation failed which means
                       this was spilt then break */
-                   if (!sym->regs[j])
-                       break;
+                   if (!sym->regs[j]) {
+                     if (j) {
+                       fprintf (stderr, "%d reg(s) lost in %s:%d\n",
+                                j, __FILE__,__LINE__);
+                     }
+                     break;
+                   }
                }
 
                /* if it shares registers with operands make sure