then mark it */
if (POINTER_GET (ic) && IS_SYMOP (IC_LEFT (ic))
&& getSize (OP_SYMBOL (IC_LEFT (ic))->type)
- <= PTRSIZE)
+ <= (unsigned int) PTRSIZE)
{
mcs51_ptrRegReq++;
ptrRegSet = 1;
symbol on the right */
for (dic = ic->prev; dic; dic = dic->prev)
{
-
/* if the definition is a call then no */
if ((dic->op == CALL || dic->op == PCALL) &&
IC_RESULT (dic)->key == IC_RIGHT (ic)->key)
/* if the true symbol is defined in far space or on stack
then we should not since this will increase register pressure */
+#if 0
if (isOperandInFarSpace (IC_RESULT (ic)))
{
if ((dic = farSpacePackable (ic)))
goto pack;
else
return 0;
-
}
+#else
+ if (isOperandInFarSpace(IC_RESULT(ic)) && !farSpacePackable(ic)) {
+ return 0;
+ }
+#endif
+
/* find the definition of iTempNN scanning backwards if we find a
a use of the true symbol in before we find the definition then
we cannot */
for (dic = ic->prev; dic; dic = dic->prev)
{
-
+#if 0 // jwk 20010410
/* if there is a function call and this is
a parameter & not my parameter then don't pack it */
if ((dic->op == CALL || dic->op == PCALL) &&
dic = NULL;
break;
}
+#else
+ /* if there is a function call then don't pack it */
+ if ((dic->op == CALL || dic->op == PCALL))
+ {
+ dic = NULL;
+ break;
+ }
+#endif
if (SKIP_IC2 (dic))
continue;
/* 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 (IS_ITEMP (IC_LEFT (ic)) &&
OP_SYMBOL (IC_LEFT (ic))->liveTo <= ic->seq)
{
}
/* do the same for the right operand */
-right:
+ right:
if (!change &&
IS_ITEMP (IC_RIGHT (ic)) &&
OP_SYMBOL (IC_RIGHT (ic))->liveTo <= ic->seq)
isBitwiseOptimizable (iCode * ic)
{
sym_link *ltype = getSpec (operandType (IC_LEFT (ic)));
- // jwk sym_link *rtype = getSpec (operandType (IC_RIGHT (ic)));
/* bitwise operations are considered optimizable
under the following conditions (Jean-Louis VERN)
- x & lit <== jwk: should be x && lit
bit & bit
bit & x
bit ^ bit
bit ^ x
- x ^ lit <== jwk: should be x ^^ lit
- x | lit <== jwk: should be x || lit
bit | bit
bit | x
*/
- if ( /* jwk IS_LITERAL (rtype) || */
- (IS_BITVAR (ltype) && IN_BITSPACE (SPEC_OCLS (ltype))))
+ if ((IS_BITVAR (ltype) && IN_BITSPACE (SPEC_OCLS (ltype))))
return TRUE;
else
return FALSE;
for (ic = ebp->sch; ic; ic = ic->next)
{
-
/* if this is an itemp & result of a address of a true sym
then mark this as rematerialisable */
if (ic->op == ADDRESS_OF &&
bitVectnBitsOn (OP_DEFS (IC_RESULT (ic))) == 1 &&
IS_OP_LITERAL (IC_RIGHT (ic))))
{
-
- //int i = operandLitValue (IC_RIGHT (ic));
OP_SYMBOL (IC_RESULT (ic))->remat = 1;
OP_SYMBOL (IC_RESULT (ic))->rematiCode = ic;
OP_SYMBOL (IC_RESULT (ic))->usl.spillLoc = NULL;
getSize (operandType (IC_RESULT (ic))) <= 2)
packRegsForAccUse (ic);
-
}
}