From 99da1686fa2381e4232c80869fa8f600e536cab1 Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Thu, 28 Feb 2008 08:03:49 +0000 Subject: [PATCH] * src/mcs51/ralloc.c (fillGaps): fixed bug 1839671 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5057 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 4 ++++ src/mcs51/ralloc.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a2f1770f..2063f69b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-28 Maarten Brock + + * src/mcs51/ralloc.c (fillGaps): fixed bug 1839671 + 2008-02-27 Borut Razem * support/scripts/sdcc.nsi: corrected installation directory for diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 7ce56c40..62fb84c5 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1510,6 +1510,10 @@ static void fillGaps() if (!sym->spillA || !sym->clashes || sym->remat) continue ; + /* if spilt in direct space the original rname is lost */ + if (sym->usl.spillLoc && (IN_DIRSPACE (SPEC_OCLS (sym->usl.spillLoc->etype)))) + continue; + /* find the liveRanges this one clashes with, that are still assigned to registers & mark the registers as used*/ for ( i = 0 ; i < sym->clashes->size ; i ++) { @@ -3225,7 +3229,7 @@ packRegisters (eBBlock ** ebpp, int blockno) /* pack registers for accumulator use, when the result of an arithmetic or bit wise operation has only one use, that use is immediately following - the defintion and the using iCode has only one + the definition and the using iCode has only one operand or has two operands but one is literal & the result of that operation is not on stack then we can leave the result of this operation in acc:b -- 2.30.2