-//#define LIVERANGEHUNT
-#ifdef LIVERANGEHUNT
- #define LRH(x) x
-#else
- #define LRH(x)
-#endif
/*------------------------------------------------------------------------
SDCCralloc.c - source file for register allocation. (8051) specific
if (!(sym->remat || sym->usl.spillLoc))
createStackSpil (sym);
- LRH(printf("spillThis: %s\n", sym->name));
/* mark it has spilt & put it in the spilt set */
sym->isspilt = sym->spillA = 1;
_G.spiltSet = bitVectSetBit (_G.spiltSet, sym->key);
/* get something we can spil */
ssym = selectSpil (ic, ebp, forSym);
- LRH(printf("spilSomething: spilled %s for %s\n", ssym->name, forSym->name));
/* mark it as spilt */
ssym->isspilt = ssym->spillA = 1;
{
sym_link *etype = operandType (IC_RIGHT (dic));
if (IS_BITFIELD (etype))
- return 0;
+ {
+ /* if result is a bit too then it's ok */
+ etype = operandType (IC_RESULT (dic));
+ if (!IS_BITFIELD (etype))
+ return 0;
+ }
}
/* if the result is on stack or iaccess then it must be
the same atleast one of the operands */
{
OP_SYMBOL (IC_RESULT (dic))->liveFrom = dic->seq;
}
- // jwk: and the otherway around?
+ // TODO: and the otherway around?
/* delete from liverange table also
delete from all the points inbetween and the new
if (!dic)
return NULL; /* didn't find any assignment to op */
- LRH(printf ("findAssignToSym: %s\n", OP_SYMBOL(IC_RESULT(dic))->name));
/* we are interested only if defined in far space */
/* or in stack space in case of + & - */
bitVectFirstBit (OP_DEFS (op)))))
return NULL;
- LRH(printf ("packRegsForOneUse: %s\n", OP_SYMBOL(op)->name));
/* if that only usage is a cast */
if (dic->op == CAST) {
/* to a bigger type */
return ;
}
/* make sure they have the same type */
+ if (IS_SPEC(operandType(IC_LEFT(ic))))
{
sym_link *itype=operandType(IC_LEFT(ic));
sym_link *ditype=operandType(IC_RIGHT(dic));