From a87274c9f0b449f37a906d540797a3c6768750cd Mon Sep 17 00:00:00 2001 From: johanknol Date: Thu, 31 Jan 2002 13:48:55 +0000 Subject: [PATCH] fixed bug #510826 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1884 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/ds390/ralloc.c | 11 +++-------- src/mcs51/ralloc.c | 9 +++------ src/xa51/ralloc.c | 11 +++-------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/ds390/ralloc.c b/src/ds390/ralloc.c index dd1a2ab6..de8d4696 100644 --- a/src/ds390/ralloc.c +++ b/src/ds390/ralloc.c @@ -1684,10 +1684,7 @@ regTypeNum () } /* if the symbol has only one definition & - that definition is a get_pointer and the - pointer we are getting is rematerializable and - in "data" space */ - + that definition is a get_pointer */ if (bitVectnBitsOn (sym->defs) == 1 && (ic = hTabItemWithKey (iCodehTab, bitVectFirstBit (sym->defs))) && @@ -1695,12 +1692,10 @@ regTypeNum () !sym->noSpilLoc && !IS_BITVAR (sym->etype)) { - - - /* if remat in data space */ + /* and that pointer is remat in data space */ if (OP_SYMBOL (IC_LEFT (ic))->remat && !IS_CAST_ICODE(OP_SYMBOL (IC_LEFT (ic))->rematiCode) && - DCL_TYPE (aggrToPtr (sym->type, FALSE)) == POINTER) + DCL_TYPE (aggrToPtr (operandType(IC_LEFT(ic)), FALSE)) == POINTER) { /* create a psuedo symbol & force a spil */ diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 90ad312f..75b73c36 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1597,10 +1597,7 @@ regTypeNum (eBBlock *ebbs) } /* if the symbol has only one definition & - that definition is a get_pointer and the - pointer we are getting is rematerializable and - in "data" space */ - + that definition is a get_pointer */ if (bitVectnBitsOn (sym->defs) == 1 && (ic = hTabItemWithKey (iCodehTab, bitVectFirstBit (sym->defs))) && @@ -1610,10 +1607,10 @@ regTypeNum (eBBlock *ebbs) { - /* if remat in data space */ + /* and that pointer is remat in data space */ if (OP_SYMBOL (IC_LEFT (ic))->remat && !IS_CAST_ICODE(OP_SYMBOL (IC_LEFT (ic))->rematiCode) && - DCL_TYPE (aggrToPtr (sym->type, FALSE)) == POINTER) + DCL_TYPE (aggrToPtr (operandType(IC_LEFT(ic)), FALSE)) == POINTER) { /* create a psuedo symbol & force a spil */ symbol *psym = newSymbol (rematStr (OP_SYMBOL (IC_LEFT (ic))), 1); diff --git a/src/xa51/ralloc.c b/src/xa51/ralloc.c index 250dbc47..037e7983 100755 --- a/src/xa51/ralloc.c +++ b/src/xa51/ralloc.c @@ -1329,10 +1329,7 @@ regTypeNum (eBBlock *ebbs) #endif /* if the symbol has only one definition & - that definition is a get_pointer and the - pointer we are getting is rematerializable and - in "data" space */ - + that definition is a get_pointer */ if (bitVectnBitsOn (sym->defs) == 1 && (ic = hTabItemWithKey (iCodehTab, bitVectFirstBit (sym->defs))) && @@ -1340,12 +1337,10 @@ regTypeNum (eBBlock *ebbs) !sym->noSpilLoc && !IS_BITVAR (sym->etype)) { - - - /* if remat in data space */ + /* and that pointer is remat in data space */ if (OP_SYMBOL (IC_LEFT (ic))->remat && !IS_CAST_ICODE(OP_SYMBOL (IC_LEFT (ic))->rematiCode) && - DCL_TYPE (aggrToPtr (sym->type, FALSE)) == POINTER) + DCL_TYPE (aggrToPtr (operandType(IC_LEFT(ic)), FALSE)) == POINTER) { /* create a psuedo symbol & force a spil */ symbol *psym = newSymbol (rematStr (OP_SYMBOL (IC_LEFT (ic))), 1); -- 2.47.2