From: epetrich Date: Sat, 26 Feb 2005 22:18:06 +0000 (+0000) Subject: * src/avr/ralloc.c (serialRegAssign), X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ec58d965706980b34d054c87c6359e7800bfe725;p=fw%2Fsdcc * src/avr/ralloc.c (serialRegAssign), * src/ds390/ralloc.c (serialRegAssign), * src/hc08/ralloc.c (serialRegAssign), * src/mcs51/ralloc.c (serialRegAssign), * src/pic/ralloc.c (serialRegAssign), * src/pic16/ralloc.c (serialRegAssign), * src/xa51/ralloc.c (serialRegAssign), * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3686 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index bfbbc86a..930efe43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-02-26 Erik Petrich + + * src/avr/ralloc.c (serialRegAssign), + * src/ds390/ralloc.c (serialRegAssign), + * src/hc08/ralloc.c (serialRegAssign), + * src/mcs51/ralloc.c (serialRegAssign), + * src/pic/ralloc.c (serialRegAssign), + * src/pic16/ralloc.c (serialRegAssign), + * src/xa51/ralloc.c (serialRegAssign), + * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154 + 2005-02-22 Maarten Brock * src/SDCCast.c (decorateType): fixed bug 1124787 diff --git a/src/avr/ralloc.c b/src/avr/ralloc.c index 4724d789..96426bb4 100644 --- a/src/avr/ralloc.c +++ b/src/avr/ralloc.c @@ -1365,6 +1365,12 @@ serialRegAssign (eBBlock ** ebbs, int count) int willCS; int j=0; + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) { + sym->usl.spillLoc->allocreq++; + } + /* if it does not need or is spilt or is already assigned to registers or will not live beyond this instructions */ diff --git a/src/ds390/ralloc.c b/src/ds390/ralloc.c index fbb65ed8..627cc475 100644 --- a/src/ds390/ralloc.c +++ b/src/ds390/ralloc.c @@ -1307,6 +1307,13 @@ serialRegAssign (eBBlock ** ebbs, int count) int willCS; int j; int ptrRegSet = 0; + + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) + { + sym->usl.spillLoc->allocreq++; + } /* if it does not need or is spilt or is already assigned to registers diff --git a/src/hc08/ralloc.c b/src/hc08/ralloc.c index 175f83dd..97a6cdaf 100644 --- a/src/hc08/ralloc.c +++ b/src/hc08/ralloc.c @@ -1265,7 +1265,13 @@ serialRegAssign (eBBlock ** ebbs, int count) int j; int ptrRegSet = 0; - /* if it does not need or is spilt + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) { + sym->usl.spillLoc->allocreq++; + } + + /* if it does not need or is spilt or is already assigned to registers or will not live beyond this instructions */ if (!sym->nRegs || diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index ca0deef7..c6db735b 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1217,6 +1217,13 @@ serialRegAssign (eBBlock ** ebbs, int count) int j; int ptrRegSet = 0; + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) + { + sym->usl.spillLoc->allocreq++; + } + /* if it does not need or is spilt or is already assigned to registers or will not live beyond this instructions */ diff --git a/src/pic/ralloc.c b/src/pic/ralloc.c index 1f70bc37..d836a168 100644 --- a/src/pic/ralloc.c +++ b/src/pic/ralloc.c @@ -2291,7 +2291,14 @@ serialRegAssign (eBBlock ** ebbs, int count) int willCS; int j; int ptrRegSet = 0; - + + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) + { + sym->usl.spillLoc->allocreq++; + } + /* if it does not need or is spilt or is already assigned to registers or will not live beyond this instructions */ diff --git a/src/pic16/ralloc.c b/src/pic16/ralloc.c index 58cc571a..03202901 100644 --- a/src/pic16/ralloc.c +++ b/src/pic16/ralloc.c @@ -2275,6 +2275,13 @@ serialRegAssign (eBBlock ** ebbs, int count) int j; int ptrRegSet = 0; + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) + { + sym->usl.spillLoc->allocreq++; + } + /* if it does not need or is spilt or is already assigned to registers or will not live beyond this instructions */ diff --git a/src/xa51/ralloc.c b/src/xa51/ralloc.c index 364895bd..e53ea595 100755 --- a/src/xa51/ralloc.c +++ b/src/xa51/ralloc.c @@ -985,7 +985,13 @@ serialRegAssign (eBBlock ** ebbs, int count) bitVect *spillable; int willCS; - /* if it does not need or is spilt + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) { + sym->usl.spillLoc->allocreq++; + } + + /* if it does not need or is spilt or is already assigned to registers or will not live beyond this instructions */ if (!sym->nRegs || diff --git a/src/z80/ralloc.c b/src/z80/ralloc.c index 07627790..2b44c0e0 100644 --- a/src/z80/ralloc.c +++ b/src/z80/ralloc.c @@ -1131,6 +1131,13 @@ serialRegAssign (eBBlock ** ebbs, int count) int j; D (D_ALLOC, ("serialRegAssign: in loop on result %p\n", sym)); + + /* Make sure any spill location is definately allocated */ + if (sym->isspilt && !sym->remat && sym->usl.spillLoc && + !sym->usl.spillLoc->allocreq) + { + sym->usl.spillLoc->allocreq++; + } /* if it does not need or is spilt or is already assigned to registers