#define D(_a, _s)
#endif
+#define DISABLE_PACKREGSFORSUPPORT 1
+#define DISABLE_PACKREGSFORACCUSE 1
+
/*-----------------------------------------------------------------*/
/* At this point we start getting processor specific although */
/* some routines are non-processor specific & can be reused when */
/* if it has a spillocation & is used less than
all other live ranges then spill this */
- if (willCS && sym->usl.spillLoc)
- {
-
- symbol *leastUsed =
- leastUsedLR (liveRangesWith (spillable,
- allLRs,
- ebbs[i],
- ic));
- if (leastUsed &&
- leastUsed->used > sym->used)
- {
- spillThis (sym);
- continue;
- }
- }
+ if (willCS) {
+ if (sym->usl.spillLoc) {
+ symbol *leastUsed = leastUsedLR (liveRangesWith (spillable,
+ allLRs, ebbs[i], ic));
+ if (leastUsed && leastUsed->used > sym->used) {
+ spillThis (sym);
+ continue;
+ }
+ } else {
+ /* if none of the liveRanges have a spillLocation then better
+ to spill this one than anything else already assigned to registers */
+ if (liveRangesWith(spillable,noSpilLoc,ebbs[i],ic)) {
+ spillThis (sym);
+ continue;
+ }
+ }
+ }
/* else we assign registers to it */
regAssigned = bitVectSetBit (regAssigned, sym->key);
return rumask;
}
+bitVect *
+z80_rUmaskForOp (operand * op)
+{
+ return rUmaskForOp (op);
+}
+
/** Returns bit vector of registers used in iCode.
*/
bitVect *
}
+#if !DISABLE_PACKREGSFORSUPPORT
+// PENDING
+
/*-----------------------------------------------------------------*/
/* packRegsForSupport :- reduce some registers for support calls */
/*-----------------------------------------------------------------*/
return change;
}
+#endif
#define IS_OP_RUONLY(x) (x && IS_SYMOP(x) && OP_SYMBOL(x)->ruonly)
ld (iy),(hl)
*/
+#if !DISABLE_PACKREGSFORACCUSE
+// PENDING
+
/** Pack registers for acc use.
When the result of this operation is small and short lived it may
be able to be stored in the accumelator.
accuse:
OP_SYMBOL (IC_RESULT (ic))->accuse = ACCUSE_A;
}
+#endif
static void
packRegsForHLUse (iCode * ic)
*/
/* First upgrade the size of (first) to int */
SPEC_NOUN (operandType (IC_LEFT (ic))) = V_INT;
- SPEC_SHORT (operandType (IC_LEFT (ic))) = 0;
floatFromVal (AOP /* need some sleep ... */ );
/* Now get and join the values */
packRegisters (ebbs[i]);
if (options.dump_pack)
- dumpEbbsToFileExt (".dumppack", ebbs, count);
+ dumpEbbsToFileExt (DUMP_PACK, ebbs, count);
/* first determine for each live range the number of
registers & the type of registers required for each */
}
if (options.dump_rassgn)
- dumpEbbsToFileExt (".dumprassgn", ebbs, count);
+ dumpEbbsToFileExt (DUMP_RASSGN, ebbs, count);
/* after that create the register mask
for each of the instruction */