From 7a81886ab751b89d770a79aedf2fdcb8c83b0379 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sat, 7 Apr 2001 10:06:50 +0000 Subject: [PATCH] fixed the multiple assignement bug with one in far space git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@731 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/ds390/ralloc.c | 8 +++++++- src/mcs51/ralloc.c | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ds390/ralloc.c b/src/ds390/ralloc.c index 28b95315..735e4607 100644 --- a/src/ds390/ralloc.c +++ b/src/ds390/ralloc.c @@ -1595,14 +1595,20 @@ packRegsForAssign (iCode * ic, eBBlock * ebp) /* if the true symbol is defined in far space or on stack then we should not since this will increase register pressure */ +#if 0 if (isOperandInFarSpace (IC_RESULT (ic))) { if ((dic = farSpacePackable (ic))) goto pack; else return 0; - } +#else + if (isOperandInFarSpace(IC_RESULT(ic)) && !farSpacePackable(ic)) { + return 0; + } +#endif + /* find the definition of iTempNN scanning backwards if we find a a use of the true symbol in before we find the definition then we cannot */ diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 82cb8ebc..a04c4c06 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1531,7 +1531,6 @@ farSpacePackable (iCode * ic) symbol on the right */ for (dic = ic->prev; dic; dic = dic->prev) { - /* if the definition is a call then no */ if ((dic->op == CALL || dic->op == PCALL) && IC_RESULT (dic)->key == IC_RIGHT (ic)->key) @@ -1605,14 +1604,20 @@ packRegsForAssign (iCode * ic, eBBlock * ebp) /* if the true symbol is defined in far space or on stack then we should not since this will increase register pressure */ +#if 0 if (isOperandInFarSpace (IC_RESULT (ic))) { if ((dic = farSpacePackable (ic))) goto pack; else return 0; - } +#else + if (isOperandInFarSpace(IC_RESULT(ic)) && !farSpacePackable(ic)) { + return 0; + } +#endif + /* find the definition of iTempNN scanning backwards if we find a a use of the true symbol in before we find the definition then we cannot */ -- 2.47.2