for (sym = setFirstItem (itmpStack); sym;
sym = setNextItem (itmpStack))
{
- if (sym->liveTo > fsym->liveFrom)
- return 0;
+ if (sym->liveFrom < fsym->liveTo &&
+ sym->liveTo > fsym->liveTo) return 0;
+ if (sym->liveFrom < fsym->liveFrom &&
+ sym->liveTo > fsym->liveFrom) return 0;
}
return 1;
/* only upto 2 bytes since we cannot predict
the usage of b, & acc */
- if (getSize (operandType (op)) > (fReturnSize - 2) &&
+ if (getSize (operandType (op)) > (fReturnSizeMCS51 - 2) &&
ic->op != RETURN &&
ic->op != SEND &&
!POINTER_SET (ic) &&
isBitwiseOptimizable (iCode * ic)
{
sym_link *ltype = getSpec (operandType (IC_LEFT (ic)));
- sym_link *rtype = getSpec (operandType (IC_RIGHT (ic)));
+ // jwk sym_link *rtype = getSpec (operandType (IC_RIGHT (ic)));
/* bitwise operations are considered optimizable
under the following conditions (Jean-Louis VERN)
- x & lit
+ x & lit <== jwk: should be x && lit
bit & bit
bit & x
bit ^ bit
bit ^ x
- x ^ lit
- x | lit
+ x ^ lit <== jwk: should be x ^^ lit
+ x | lit <== jwk: should be x || lit
bit | bit
bit | x
*/
- if (IS_LITERAL (rtype) ||
+ if ( /* jwk IS_LITERAL (rtype) || */
(IS_BITVAR (ltype) && IN_BITSPACE (SPEC_OCLS (ltype))))
return TRUE;
else
/* TrueSym := iTempNN:1 */
for (ic = ebp->sch; ic; ic = ic->next)
{
-
-
/* find assignment of the form TrueSym := iTempNN:1 */
if (ic->op == '=' && !POINTER_SET (ic))
change += packRegsForAssign (ic, ebp);
is defined in the previous instruction then
mark the itemp as a conditional */
if ((IS_CONDITIONAL (ic) ||
- ((ic->op == BITWISEAND ||
- ic->op == '|' ||
- ic->op == '^') &&
- isBitwiseOptimizable (ic))) &&
+ (IS_BITWISE_OP(ic) && isBitwiseOptimizable (ic))) &&
ic->next && ic->next->op == IFX &&
isOperandEqual (IC_RESULT (ic), IC_COND (ic->next)) &&
OP_SYMBOL (IC_RESULT (ic))->liveTo <= ic->next->seq)
{
-
OP_SYMBOL (IC_RESULT (ic))->regType = REG_CND;
continue;
}
if (options.dump_rassgn)
{
dumpEbbsToFileExt (".dumprassgn", ebbs, count);
- dumpLiveRanges (".lrange", liveRanges);
+ dumpLiveRanges (".dumplrange", liveRanges);
}
/* do the overlaysegment stuff SDCCmem.c */