From 018012d1b59dfb839b511183ef7640b969a00669 Mon Sep 17 00:00:00 2001 From: sandeep Date: Sat, 29 Dec 2001 23:43:53 +0000 Subject: [PATCH] packRegsForSupport could mess up the live information (Fixed) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1748 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/mcs51/ralloc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index fcc86572..b6ee9a42 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1994,10 +1994,13 @@ packRegsForSupport (iCode * ic, eBBlock * ebp) /* found it we need to remove it from the block */ - for (sic = dic; sic != ic; sic = sic->next) + for (sic = dic; sic != ic; sic = sic->next) { bitVectUnSetBit (sic->rlive, IC_LEFT (ic)->key); + sic->rlive = bitVectSetBit (sic->rlive, IC_RIGHT (dic)->key); + } OP_SYMBOL(IC_LEFT (ic))=OP_SYMBOL(IC_RIGHT (dic)); + OP_SYMBOL(IC_LEFT(ic))->liveTo = ic->seq; IC_LEFT (ic)->key = OP_SYMBOL(IC_RIGHT (dic))->key; remiCodeFromeBBlock (ebp, dic); bitVectUnSetBit(OP_SYMBOL(IC_RESULT(dic))->defs,dic->key); @@ -2027,11 +2030,14 @@ packRegsForSupport (iCode * ic, eBBlock * ebp) } /* found it we need to remove it from the block */ - for (sic = dic; sic != ic; sic = sic->next) + for (sic = dic; sic != ic; sic = sic->next) { bitVectUnSetBit (sic->rlive, IC_RIGHT (ic)->key); + sic->rlive = bitVectSetBit (sic->rlive, IC_RIGHT (dic)->key); + } IC_RIGHT (ic)->operand.symOperand = IC_RIGHT (dic)->operand.symOperand; + OP_SYMBOL(IC_RIGHT(ic))->liveTo = ic->seq; IC_RIGHT (ic)->key = IC_RIGHT (dic)->operand.symOperand->key; remiCodeFromeBBlock (ebp, dic); -- 2.47.2