/*-----------------------------------------------------------------*/
static int
packRegsForSupport (iCode * ic, eBBlock * ebp)
-{
+{
int change = 0;
+
/* for the left & right operand :- look to see if the
left was assigned a true symbol in far space in that
case replace them */
if (OP_SYMBOL(IC_RESULT(ic))->liveTo ==
OP_SYMBOL(IC_RESULT(ic))->liveFrom) continue ;
etype = getSpec(type = operandType(IC_RESULT(ic)));
- //if (getSize(type) == 0 || isOperandEqual(op,IC_RESULT(ic)))
- if (getSize(type) == 0)
- continue ;
+ if (getSize(type) == 0 || isOperandEqual(op,IC_RESULT(ic)))
+ continue ;
return NULL ;
}
}
#endif
+#if 0 /* unsafe */
/* reduce for support function calls */
if (ic->supportRtn || ic->op == '+' || ic->op == '-')
packRegsForSupport (ic, ebp);
+#endif
/* some cases the redundant moves can
can be eliminated for return statements */
packRegsDPTRuse (IC_LEFT (ic));
}
- if ((ic->op == CALL && getSize(operandType(IC_RESULT(ic))) <= 4)) {
- packRegsDPTRuse (IC_RESULT (ic));
+ if (ic->op == CALL) {
+ sym_link *ftype = operandType(IC_LEFT(ic));
+ if (getSize(operandType(IC_RESULT(ic))) <= 4 &&
+ !IFFUNC_ISBUILTIN(ftype)) {
+ packRegsDPTRuse (IC_RESULT (ic));
+ }
}
/* if pointer set & left has a size more than