* src/ds390/ralloc.c (getRegPtr, getRegGpr),
* src/pic/ralloc.c (getRegPtr, getRegGpr),
* src/pic16/ralloc.c (getRegPtr, getRegGpr),
* src/z80/ralloc.c (getRegGpr): fixed bug #883361
* as/mcs51/asexpr.c (term),
* as/hc08/asexpr.c (term): fixed bug #887146
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3158
4a8a32a2-be11-0410-ad9d-
d568d2c75423
-2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+ * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
+ * src/ds390/ralloc.c (getRegPtr, getRegGpr),
+ * src/pic/ralloc.c (getRegPtr, getRegGpr),
+ * src/pic16/ralloc.c (getRegPtr, getRegGpr),
+ * src/z80/ralloc.c (getRegGpr): fixed bug #883361
+ * as/mcs51/asexpr.c (term),
+ * as/hc08/asexpr.c (term): fixed bug #887146
+
+2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/z80/gen.c (genMult): handle single byte result product
* src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
}
tp = tp->t_lnk;
}
- /* err('u'); */
+ err('u');
return;
}
r = radix;
}
tp = tp->t_lnk;
}
- /* err('u'); */
+ err('u');
return;
}
r = radix;
getRegPtr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
tryAgain:
/* try for a ptr type */
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegGpr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
tryAgain:
/* try for gpr type */
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegPtr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
tryAgain:
/* try for a ptr type */
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegGpr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
-
+ int j;
+
tryAgain:
/* try for gpr type */
if ((reg = allocReg (REG_GPR)))
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
mcs51_ptrRegReq++;
ptrRegSet = 1;
}
+ if (IC_LEFT (ic) && IS_SYMOP (IC_LEFT (ic))
+ && SPEC_OCLS(OP_SYMBOL (IC_LEFT (ic))->etype) == idata) {
+ mcs51_ptrRegReq++;
+ ptrRegSet = 1;
+ }
+ if (IC_RIGHT (ic) && IS_SYMOP (IC_RIGHT (ic))
+ && SPEC_OCLS(OP_SYMBOL (IC_RIGHT (ic))->etype) == idata) {
+ mcs51_ptrRegReq++;
+ ptrRegSet = 1;
+ }
+
/* else we assign registers to it */
_G.regAssigned = bitVectSetBit (_G.regAssigned, sym->key);
_G.totRegAssigned = bitVectSetBit (_G.totRegAssigned, sym->key);
getRegPtr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
debugLog ("%s\n", __FUNCTION__);
tryAgain:
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegGpr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
debugLog ("%s\n", __FUNCTION__);
tryAgain:
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegPtr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
debugLog ("%s\n", __FUNCTION__);
tryAgain:
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegGpr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
debugLog ("%s\n", __FUNCTION__);
tryAgain:
if (!spilSomething (ic, ebp, sym))
return NULL;
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
+
/* this looks like an infinite loop but
in really selectSpil will abort */
goto tryAgain;
getRegGpr (iCode * ic, eBBlock * ebp, symbol * sym)
{
regs *reg;
+ int j;
D (D_ALLOC, ("getRegGpr: on ic %p\n", ic));
tryAgain:
D (D_ALLOC, ("getRegGpr: have to spill.\n"));
return NULL;
}
+
+ /* make sure partially assigned registers aren't reused */
+ for (j=0; j<=sym->nRegs; j++)
+ if (sym->regs[j])
+ sym->regs[j]->isFree = 0;
/* this looks like an infinite loop but
in really selectSpil will abort */