]> git.gag.com Git - fw/sdcc/commitdiff
* src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
authormaartenbrock <maartenbrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 5 Aug 2004 12:34:53 +0000 (12:34 +0000)
committermaartenbrock <maartenbrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 5 Aug 2004 12:34:53 +0000 (12:34 +0000)
  there's no need to make it worse

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

ChangeLog
src/ds390/ralloc.c
src/pic/ralloc.c

index 8c6b6f4ee0bb1b39c16faf2cbd13aaee367b7f82..e34d039fc7ef3be56a17b736ae2264e9ae5ed0e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
+
+       * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
+         there's no need to make it worse
+
 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
 
        * src/mcs51/ralloc.c (deassignLR),
index c25c6d46fa424971e15aaa1f168eff14dc860f91..e75a587f0ac15910ed4913a3b5703817ff9e1092 100644 (file)
@@ -991,7 +991,7 @@ deassignLRs (iCode * ic, eBBlock * ebp)
               (result = OP_SYMBOL (IC_RESULT (ic))) &&  /* has a result */
               result->liveTo > ic->seq &&       /* and will live beyond this */
               result->liveTo <= ebp->lSeq &&    /* does not go beyond this block */
-             result->liveFrom == ic->seq &&    /* does not start before here */
+              result->liveFrom == ic->seq &&    /* does not start before here */
               result->regType == sym->regType &&        /* same register types */
               result->nRegs &&  /* which needs registers */
               !result->isspilt &&       /* and does not already have them */
index d12186f789872bce39a75754bf0a1e2a221836fb..768f19090189aae1df2f30b8bf7cfb4058ad2b12 100644 (file)
@@ -2021,7 +2021,7 @@ deassignLRs (iCode * ic, eBBlock * ebp)
                if (sym->liveTo > ic->seq)
                        continue;
                
-               /* if it was spilt on stack then we can 
+                       /* if it was spilt on stack then we can 
                mark the stack spil location as free */
                if (sym->isspilt)
                {
@@ -2036,9 +2036,9 @@ deassignLRs (iCode * ic, eBBlock * ebp)
                if (!bitVectBitValue (_G.regAssigned, sym->key))
                        continue;
                
-               /* special case check if this is an IFX &
-               the privious one was a pop and the 
-               previous one was not spilt then keep track
+                       /* special case check if this is an IFX &
+                       the privious one was a pop and the 
+                       previous one was not spilt then keep track
                of the symbol */
                if (ic->op == IFX && ic->prev &&
                        ic->prev->op == IPOP &&
@@ -2067,6 +2067,7 @@ deassignLRs (iCode * ic, eBBlock * ebp)
                                result->liveTo > ic->seq &&     /* and will live beyond this */
                                result->liveTo <= ebp->lSeq &&  /* does not go beyond this block */
                                result->liveFrom == ic->seq &&    /* does not start before here */                              result->regType == sym->regType &&      /* same register types */
+                               result->regType == sym->regType &&      /* same register types */
                                result->nRegs &&        /* which needs registers */
                                !result->isspilt &&     /* and does not already have them */
                                !result->remat &&
@@ -2265,7 +2266,7 @@ serialRegAssign (eBBlock ** ebbs, int count)
                                IS_TRUE_SYMOP (IC_RESULT (ic)))
                                OP_SYMBOL (IC_RESULT (ic))->allocreq = 1;
                        
-                       /* take away registers from live
+                               /* take away registers from live
                        ranges that end at this instruction */
                        deassignLRs (ic, ebbs[i]);
                        
@@ -2405,43 +2406,43 @@ serialRegAssign (eBBlock ** ebbs, int count)
                                        ptrRegSet = 0;
                                }
                                
-                       }
                }
        }
+       }
 
-       /* Check for and fix any problems with uninitialized operands */
+    /* Check for and fix any problems with uninitialized operands */
     for (i = 0; i < count; i++)
-       {
-               iCode *ic;
-               
-               if (ebbs[i]->noPath &&
-                       (ebbs[i]->entryLabel != entryLabel &&
-                       ebbs[i]->entryLabel != returnLabel))
-                       continue;
-               
-               for (ic = ebbs[i]->sch; ic; ic = ic->next)
-               {
-                       if (SKIP_IC2 (ic))
-                               continue;
-                       
-                       if (ic->op == IFX)
-                       {
-                               verifyRegsAssigned (IC_COND (ic), ic);
-                               continue;
-                       }
-                       
-                       if (ic->op == JUMPTABLE)
-                       {
-                               verifyRegsAssigned (IC_JTCOND (ic), ic);
-                               continue;
-                       }
-                       
-                       verifyRegsAssigned (IC_RESULT (ic), ic);
-                       verifyRegsAssigned (IC_LEFT (ic), ic);
-                       verifyRegsAssigned (IC_RIGHT (ic), ic);
-               }
-       }
-       
+      {
+       iCode *ic;
+
+       if (ebbs[i]->noPath &&
+           (ebbs[i]->entryLabel != entryLabel &&
+            ebbs[i]->entryLabel != returnLabel))
+           continue;
+
+       for (ic = ebbs[i]->sch; ic; ic = ic->next)
+         {
+           if (SKIP_IC2 (ic))
+             continue;
+
+           if (ic->op == IFX)
+             {
+               verifyRegsAssigned (IC_COND (ic), ic);
+               continue;
+             }
+
+           if (ic->op == JUMPTABLE)
+             {
+               verifyRegsAssigned (IC_JTCOND (ic), ic);
+               continue;
+             }
+
+           verifyRegsAssigned (IC_RESULT (ic), ic);
+           verifyRegsAssigned (IC_LEFT (ic), ic);
+           verifyRegsAssigned (IC_RIGHT (ic), ic);
+          }
+      }    
+
 }
 
 /*-----------------------------------------------------------------*/
@@ -4111,7 +4112,7 @@ pic14_assignRegisters (eBBlock ** ebbs, int count)
        if (options.dump_pack)
                dumpEbbsToFileExt (DUMP_PACK, ebbs, count);
        
-       /* first determine for each live range the number of 
+               /* first determine for each live range the number of 
        registers & the type of registers required for each */
        regTypeNum ();