* src/avr/ralloc.c (serialRegAssign),
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 8 Jun 2004 06:05:47 +0000 (06:05 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 8 Jun 2004 06:05:47 +0000 (06:05 +0000)
* src/xa51/ralloc.c (serialRegAssign),
* src/pic/ralloc.c (serialRegAssign),
* src/pic16/ralloc.c (serialRegAssign),
* src/hc08/ralloc.c (serialRegAssign),
* src/z80/ralloc.c (serialRegAssign),
* src/ds390/ralloc.c (serialRegAssign),
* src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479

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

ChangeLog
src/avr/ralloc.c
src/ds390/ralloc.c
src/hc08/ralloc.c
src/mcs51/ralloc.c
src/pic/ralloc.c
src/pic16/ralloc.c
src/xa51/ralloc.c
src/z80/ralloc.c

index 36d2c9d3bd71b61fbe5ad22ee6cbe08fafab3fb5..1f5c40e1950411478bf1f5a77e8c19d80a8eb311 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/avr/ralloc.c (serialRegAssign),
+       * src/xa51/ralloc.c (serialRegAssign),
+       * src/pic/ralloc.c (serialRegAssign),
+       * src/pic16/ralloc.c (serialRegAssign),
+       * src/hc08/ralloc.c (serialRegAssign),
+       * src/z80/ralloc.c (serialRegAssign),
+       * src/ds390/ralloc.c (serialRegAssign),
+       * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
+       
 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
 
        * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
index abecd394c9a2efde31e97fec66b23eb669e6b98c..fce0f8024b6719639408598889601acee6eaf825 100644 (file)
@@ -1393,6 +1393,17 @@ serialRegAssign (eBBlock ** ebbs, int count)
                                        continue;
                                }
 
+                               /* If the live range preceeds the point of definition 
+                                  then ideally we must take into account registers that 
+                                  have been allocated after sym->liveFrom but freed
+                                  before ic->seq. This is complicated, so spill this
+                                  symbol instead and let fillGaps handle the allocation. */
+                               if (sym->liveFrom < ic->seq)
+                               {
+                                       spillThis (sym);
+                                       continue;                     
+                               }
+
                                /* if it has a spillocation & is used less than
                                   all other live ranges then spill this */
                                if (willCS) {
index afede94d6af3cf9bbbc42b332d629b188844ea3c..618c16516e75d82156e9e5b6bd22091f5958eb65 100644 (file)
@@ -1332,6 +1332,17 @@ serialRegAssign (eBBlock ** ebbs, int count)
 
                }
 
+             /* If the live range preceeds the point of definition 
+                then ideally we must take into account registers that 
+                have been allocated after sym->liveFrom but freed
+                before ic->seq. This is complicated, so spill this
+                symbol instead and let fillGaps handle the allocation. */
+             if (sym->liveFrom < ic->seq)
+               {
+                   spillThis (sym);
+                   continue;                 
+               }
+
              /* if it has a spillocation & is used less than
                 all other live ranges then spill this */
                if (willCS) {
index 4669e852cc04def5a22e83efd51c9edae947ccc0..25c75138bf9ab286e144dae5ad27ef3e0e5b2d7e 100644 (file)
@@ -1289,6 +1289,16 @@ serialRegAssign (eBBlock ** ebbs, int count)
                    continue;                 
                }
 
+               /* If the live range preceeds the point of definition 
+                  then ideally we must take into account registers that 
+                  have been allocated after sym->liveFrom but freed
+                  before ic->seq. This is complicated, so spill this
+                  symbol instead and let fillGaps handle the allocation. */
+               if (sym->liveFrom < ic->seq) {
+                   spillThis (sym);
+                   continue;                 
+               }
+
                /* if it has a spillocation & is used less than
                   all other live ranges then spill this */
                if (willCS) {
index 8d7f6556abbf2b2751692400d97f1a6c67851840..ffa28c056bd95fc117ada6db7644503977f0b476 100644 (file)
@@ -1237,6 +1237,16 @@ serialRegAssign (eBBlock ** ebbs, int count)
                    spillThis (sym);
                    continue;                 
                }
+               
+               /* If the live range preceeds the point of definition 
+                  then ideally we must take into account registers that 
+                  have been allocated after sym->liveFrom but freed
+                  before ic->seq. This is complicated, so spill this
+                  symbol instead and let fillGaps handle the allocation. */
+               if (sym->liveFrom < ic->seq) {
+                   spillThis (sym);
+                   continue;                 
+               }
 
                /* if it has a spillocation & is used less than
                   all other live ranges then spill this */
index e71c82f99352dd75d963e8bd85280c0a1241e3ec..cce44ed13110e3215e36af93362d89a52486836d 100644 (file)
@@ -2319,6 +2319,17 @@ serialRegAssign (eBBlock ** ebbs, int count)
                                        continue;
                                        
                                }
+
+                               /* If the live range preceeds the point of definition 
+                                  then ideally we must take into account registers that 
+                                  have been allocated after sym->liveFrom but freed
+                                  before ic->seq. This is complicated, so spill this
+                                  symbol instead and let fillGaps handle the allocation. */
+                               if (sym->liveFrom < ic->seq)
+                               {
+                                       spillThis (sym);
+                                       continue;                     
+                               }
                                
                                /* if it has a spillocation & is used less than
                                all other live ranges then spill this */
index 93cab98daa5fe1301d79092c2a845a0d526c19ea..7d5e782dce4bf89e3a19a231979715bc1cd612fb 100644 (file)
@@ -2190,6 +2190,17 @@ serialRegAssign (eBBlock ** ebbs, int count)
 
                }
 
+             /* If the live range preceeds the point of definition 
+                then ideally we must take into account registers that 
+                have been allocated after sym->liveFrom but freed
+                before ic->seq. This is complicated, so spill this
+                symbol instead and let fillGaps handle the allocation. */
+             if (sym->liveFrom < ic->seq)
+               {
+                   spillThis (sym);
+                   continue;                 
+               }
+
              /* if it has a spillocation & is used less than
                 all other live ranges then spill this */
                if (willCS) {
index 1f530ece925535d57c7da83b39c2841f6329e2a2..27c88a44f9127195957d2347e000a319039b8725 100755 (executable)
@@ -1010,6 +1010,16 @@ serialRegAssign (eBBlock ** ebbs, int count)
          continue;                   
        }
        
+       /* If the live range preceeds the point of definition 
+          then ideally we must take into account registers that 
+          have been allocated after sym->liveFrom but freed
+          before ic->seq. This is complicated, so spill this
+          symbol instead and let fillGaps handle the allocation. */
+       if (sym->liveFrom < ic->seq) {
+           spillThis (sym);
+           continue;                 
+       }
+       
        /* if it has a spillocation & is used less than
           all other live ranges then spill this */
        if (willCS) {
index ed6868c8d7326ca591ba8ba61b9eb571a75875c4..53f212194944199e8cfef500ff33ee76d2ab380d 100644 (file)
@@ -1168,6 +1168,17 @@ serialRegAssign (eBBlock ** ebbs, int count)
 
                }
 
+             /* If the live range preceeds the point of definition 
+                then ideally we must take into account registers that 
+                have been allocated after sym->liveFrom but freed
+                before ic->seq. This is complicated, so spill this
+                symbol instead and let fillGaps handle the allocation. */
+             if (sym->liveFrom < ic->seq)
+               {
+                   spillThis (sym);
+                   continue;                 
+               }
+
              /* if it has a spillocation & is used less than
                 all other live ranges then spill this */
              if (willCS) {