reg->isFree = 0;
}
-#if 0
-/*-----------------------------------------------------------------*/
-/* allDefsOutOfRange - all definitions are out of a range */
-/*-----------------------------------------------------------------*/
-static bool
-allDefsOutOfRange (bitVect * defs, int fseq, int toseq)
-{
- int i;
-
- if (!defs)
- return TRUE;
-
- for (i = 0; i < defs->size; i++)
- {
- iCode *ic;
-
- if (bitVectBitValue (defs, i) &&
- (ic = hTabItemWithKey (iCodehTab, i)) &&
- (ic->seq >= fseq && ic->seq <= toseq))
-
- return FALSE;
-
- }
-
- return TRUE;
-}
-#endif
-
/*-----------------------------------------------------------------*/
/* computeSpillable - given a point find the spillable live ranges */
/*-----------------------------------------------------------------*/
}
- setToNull ((void **) &sset);
+ setToNull ((void *) &sset);
sym->blockSpil = 0;
return sym;
}
return ((sym->usl.spillLoc && !sym->uptr) ? 1 : 0);
}
-/*-----------------------------------------------------------------*/
-/* notUsedInBlock - not used in this block */
-/*-----------------------------------------------------------------*/
-static int
-notUsedInBlock (symbol * sym, eBBlock * ebp, iCode * ic)
-{
- return (!bitVectBitsInCommon (sym->defs, ebp->usesDefs) &&
- allDefsOutOfRange (sym->defs, ebp->fSeq, ebp->lSeq));
-/* return (!bitVectBitsInCommon(sym->defs,ebp->usesDefs)); */
-}
-
/*-----------------------------------------------------------------*/
/* notUsedInRemaining - not used or defined in remain of the block */
/*-----------------------------------------------------------------*/
return reg;
}
assert(0);
+
+ /* just to make the compiler happy */
+ return 0;
}
/** Symbol has a given register.
bitVectBitValue(_G.totRegAssigned,i) == 0) /* and are still assigned to registers */
continue ;
- assert (clr = hTabItemWithKey(liveRanges,i));
+ clr = hTabItemWithKey(liveRanges,i);
+ assert(clr);
/* mark these registers as used */
for (k = 0 ; k < clr->nRegs ; k++ )
// PENDING: Check vs mcs51
bitVectUnSetBit(OP_SYMBOL(IC_RESULT(ic))->defs,ic->key);
hTabDeleteItem (&iCodehTab, ic->key, ic, DELETE_ITEM, NULL);
- OP_DEFS (IC_RESULT (dic)) = bitVectSetBit (OP_DEFS (IC_RESULT (dic)), dic->key);
+ OP_DEFS(IC_RESULT (dic))=bitVectSetBit (OP_DEFS (IC_RESULT (dic)), dic->key);
return 1;
}
return NULL;
}
+ if (getSize (operandType (op)) != 2)
+ {
+ D (D_ACCUSE2, (" + Dropping as operation has size is too big\n"));
+ return FALSE;
+ }
+
/* Nothing else that clashes with this is using the scratch
register. Scan through all of the intermediate instructions and
see if any of them could nuke HL.
/* if pointer get */
if (!DISABLE_PACK_ONE_USE &&
POINTER_GET (ic) &&
+ IS_SYMOP (IC_LEFT (ic)) &&
/* MLH: dont have far space
!isOperandInFarSpace(IC_RESULT(ic))&& */
!OP_SYMBOL (IC_LEFT (ic))->remat &&
if (!DISABLE_PACK_HL && IS_ITEMP (IC_RESULT (ic)))
{
+ /* PENDING */
if (IS_GB)
- packRegsForHLUse (ic);
+ {
+ if (0)
+ packRegsForHLUse (ic);
+ }
else
- packRegsForHLUse3 (ic, IC_RESULT (ic), ebp);
+ {
+ packRegsForHLUse3 (ic, IC_RESULT (ic), ebp);
+ }
}
if (!DISABLE_PACK_IY && IS_ITEMP (IC_RESULT (ic)) && IS_Z80)
first = (int)operandLitValue ( IC_LEFT (ic));
second = (int)operandLitValue ( IC_LEFT (uic));
- sprintf (buffer, "%u", ((first << 8) | (second & 0xFF)) & 0xFFFFU);
+ sprintf (buffer, "%uu", ((first << 8) | (second & 0xFF)) & 0xFFFFU);
val = constVal (buffer);
SPEC_NOUN (val->type) = V_INT;
+ IC_LEFT (ic) = operandFromOperand (IC_LEFT (ic));
IC_LEFT (ic)->operand.valOperand = val;
/* Now remove the second one from the list. */
/* free up any stackSpil locations allocated */
applyToSet (_G.stackSpil, deallocStackSpil);
_G.slocNum = 0;
- setToNull ((void **) &_G.stackSpil);
- setToNull ((void **) &_G.spiltSet);
+ setToNull ((void *) &_G.stackSpil);
+ setToNull ((void *) &_G.spiltSet);
/* mark all registers as free */
freeAllRegs ();