fixed the gencmp setting of supportRtn
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Apr 2001 09:05:01 +0000 (09:05 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Apr 2001 09:05:01 +0000 (09:05 +0000)
cleaned up some things

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@734 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/avr/gen.c
src/ds390/gen.c
src/mcs51/gen.c
src/mcs51/ralloc.c
src/pic/gen.c

index a388da89887b003160663c00d631259dbcd5b1cd..5496080c9a98c37cc4a77dae35bd9b06c32cd1dc 100644 (file)
@@ -258,7 +258,6 @@ getFreePtr (iCode * ic, asmop ** aopp, bool result, bool zonly)
                return NULL;
        }
 
-       piCode (ic, stdout);
        /* other wise this is true end of the world */
        werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
                "getFreePtr should never reach here");
@@ -5256,8 +5255,6 @@ genAVRCode (iCode * lic)
 
                default:
                        ic = ic;
-                       /*      piCode(ic,stdout); */
-
                }
        }
 
index f85207e39089982a9250d5021ae581552967e8a6..cf3786f7da0385cad7f91cb3132beb76c01e3942 100644 (file)
@@ -233,7 +233,6 @@ endOfWorld:
       return NULL;
     }
 
-  piCode (ic, stdout);
   /* other wise this is true end of the world */
   werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
          "getFreePtr should never reach here");
@@ -9476,8 +9475,6 @@ gen390Code (iCode * lic)
 
        default:
          ic = ic;
-         /*      piCode(ic,stdout); */
-
        }
     }
 
index b239ecc4c0c3606612c8710bdbb2173dac247df7..048b2148af6fda89745e13a4d95dda3b5dc347e3 100644 (file)
@@ -233,7 +233,6 @@ endOfWorld:
       return NULL;
     }
 
-  piCode (ic, stdout);
   /* other wise this is true end of the world */
   werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
          "getFreePtr should never reach here");
@@ -3151,98 +3150,6 @@ genMultbits (operand * left,
 /*-----------------------------------------------------------------*/
 /* genMultOneByte : 8*8=8/16 bit multiplication                    */
 /*-----------------------------------------------------------------*/
-#if 0 // REMOVE ME
-static void
-genMultOneByte (operand * left,
-               operand * right,
-               operand * result)
-{
-  sym_link *opetype = operandType (result);
-  char *l;
-  symbol *lbl;
-  int size, offset;
-
-  /* (if two literals, the value is computed before) */
-  /* if one literal, literal on the right */
-  if (AOP_TYPE (left) == AOP_LIT)
-    {
-      operand *t = right;
-      right = left;
-      left = t;
-    }
-
-  size = AOP_SIZE (result);
-  /* signed or unsigned */
-  emitcode ("mov", "b,%s", aopGet (AOP (right), 0, FALSE, FALSE));
-  l = aopGet (AOP (left), 0, FALSE, FALSE);
-  MOVA (l);
-  emitcode ("mul", "ab");
-  /* if result size = 1, mul signed = mul unsigned */
-  aopPut (AOP (result), "a", 0);
-  if (size > 1)
-    {
-      if (SPEC_USIGN (opetype))
-       {
-         aopPut (AOP (result), "b", 1);
-         if (size > 2)
-           /* for filling the MSBs */
-           emitcode ("clr", "a");
-       }
-      else
-       {
-         emitcode ("mov", "a,b");
-
-         /* adjust the MSB if left or right neg */
-
-         /* if one literal */
-         if (AOP_TYPE (right) == AOP_LIT)
-           {
-             /* AND literal negative */
-             if ((int) floatFromVal (AOP (right)->aopu.aop_lit) < 0)
-               {
-                 /* adjust MSB (c==0 after mul) */
-                 emitcode ("subb", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE));
-               }
-           }
-         else
-           {
-             lbl = newiTempLabel (NULL);
-             emitcode ("xch", "a,%s", aopGet (AOP (right), 0, FALSE, FALSE));
-             emitcode ("cjne", "a,#0x80,%05d$", (lbl->key + 100));
-             emitcode ("", "%05d$:", (lbl->key + 100));
-             emitcode ("xch", "a,%s", aopGet (AOP (right), 0, FALSE, FALSE));
-             lbl = newiTempLabel (NULL);
-             emitcode ("jc", "%05d$", (lbl->key + 100));
-             emitcode ("subb", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE));
-             emitcode ("", "%05d$:", (lbl->key + 100));
-           }
-
-         lbl = newiTempLabel (NULL);
-         emitcode ("xch", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE));
-         emitcode ("cjne", "a,#0x80,%05d$", (lbl->key + 100));
-         emitcode ("", "%05d$:", (lbl->key + 100));
-         emitcode ("xch", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE));
-         lbl = newiTempLabel (NULL);
-         emitcode ("jc", "%05d$", (lbl->key + 100));
-         emitcode ("subb", "a,%s", aopGet (AOP (right), 0, FALSE, FALSE));
-         emitcode ("", "%05d$:", (lbl->key + 100));
-
-         aopPut (AOP (result), "a", 1);
-         if (size > 2)
-           {
-             /* get the sign */
-             emitcode ("rlc", "a");
-             emitcode ("subb", "a,acc");
-           }
-       }
-      size -= 2;
-      offset = 2;
-      if (size > 0)
-       while (size--)
-         aopPut (AOP (result), "a", offset++);
-    }
-}
-#else
 static void
 genMultOneByte (operand * left,
                operand * right,
@@ -3343,7 +3250,6 @@ genMultOneByte (operand * left,
     aopPut (AOP (result), "b", 1);
   }
 }
-#endif
 
 /*-----------------------------------------------------------------*/
 /* genMult - generates code for multiplication                     */
@@ -8577,8 +8483,6 @@ gen51Code (iCode * lic)
 
        default:
          ic = ic;
-         /*      piCode(ic,stdout); */
-
        }
     }
 
index a41a4bf6371b6a6bfa1f049c7004ef64b32cb462..3eeeac062664ff027fc9fb01f4d14af6d1073209 100644 (file)
@@ -2337,10 +2337,8 @@ packRegisters (eBBlock * ebp)
        }
 
       /* reduce for support function calls */
-#if geniCodeLogicHasBeenFixed
       if (ic->supportRtn || ic->op == '+' || ic->op == '-')
        packRegsForSupport (ic, ebp);
-#endif
 
       /* some cases the redundant moves can
          can be eliminated for return statements */
index d43424272d4b2c6bd3b19d5827c7f90016e7bb46..0c8d2825a42487c7467903567fe6791e23ac6484 100644 (file)
@@ -292,7 +292,6 @@ endOfWorld :
         return NULL;
     }
 
-    piCode(ic,stdout);
     /* other wise this is true end of the world */
     werror(E_INTERNAL_ERROR,__FILE__,__LINE__,
            "getFreePtr should never reach here");
@@ -8450,8 +8449,6 @@ void genpic14Code (iCode *lic)
 
        default :
            ic = ic;
-           /*      piCode(ic,stdout); */
-           
         }
     }