LIVE ranges */
if (!ds390_ptrRegReq && isSpiltOnStack (sym))
{
- ds390_ptrRegReq++;
+ ds390_ptrRegReq += !options.stack10bit;
spillLRWithPtrReg (sym);
}
/* if spilt on stack then free up r0 & r1
if they could have been assigned to as gprs */
- if (!ds390_ptrRegReq && isSpiltOnStack (ssym))
+ if (!ds390_ptrRegReq && isSpiltOnStack (ssym) && !options.stack10bit)
{
- ds390_ptrRegReq++;
+ ds390_ptrRegReq++;
spillLRWithPtrReg (ssym);
}
/* if we are using a symbol on the stack
then we should say ds390_ptrRegReq */
if (ic->op == IFX && IS_SYMOP (IC_COND (ic)))
- ds390_ptrRegReq += ((OP_SYMBOL (IC_COND (ic))->onStack ||
- OP_SYMBOL (IC_COND (ic))->iaccess) ? 1 : 0);
+ ds390_ptrRegReq += ((OP_SYMBOL (IC_COND (ic))->onStack ? !options.stack10bit : 0) +
+ OP_SYMBOL (IC_COND (ic))->iaccess);
else if (ic->op == JUMPTABLE && IS_SYMOP (IC_JTCOND (ic)))
- ds390_ptrRegReq += ((OP_SYMBOL (IC_JTCOND (ic))->onStack ||
- OP_SYMBOL (IC_JTCOND (ic))->iaccess) ? 1 : 0);
+ ds390_ptrRegReq += ((OP_SYMBOL (IC_JTCOND (ic))->onStack ? !options.stack10bit : 0) +
+ OP_SYMBOL (IC_JTCOND (ic))->iaccess);
else
{
if (IS_SYMOP (IC_LEFT (ic)))
- ds390_ptrRegReq += ((OP_SYMBOL (IC_LEFT (ic))->onStack ||
- OP_SYMBOL (IC_LEFT (ic))->iaccess) ? 1 : 0);
+ ds390_ptrRegReq += ((OP_SYMBOL (IC_LEFT (ic))->onStack ? !options.stack10bit : 0) +
+ OP_SYMBOL (IC_LEFT (ic))->iaccess);
if (IS_SYMOP (IC_RIGHT (ic)))
- ds390_ptrRegReq += ((OP_SYMBOL (IC_RIGHT (ic))->onStack ||
- OP_SYMBOL (IC_RIGHT (ic))->iaccess) ? 1 : 0);
+ ds390_ptrRegReq += ((OP_SYMBOL (IC_RIGHT (ic))->onStack ? !options.stack10bit : 0) +
+ OP_SYMBOL (IC_RIGHT (ic))->iaccess);
if (IS_SYMOP (IC_RESULT (ic)))
- ds390_ptrRegReq += ((OP_SYMBOL (IC_RESULT (ic))->onStack ||
- OP_SYMBOL (IC_RESULT (ic))->iaccess) ? 1 : 0);
+ ds390_ptrRegReq += ((OP_SYMBOL (IC_RESULT (ic))->onStack ? !options.stack10bit : 0) +
+ OP_SYMBOL (IC_RESULT (ic))->iaccess);
}
}
we can leave the result of this operation in acc:b
combination */
if ((IS_ARITHMETIC_OP (ic)
-
+ || IS_CONDITIONAL(ic)
|| IS_BITWISE_OP (ic)
-
|| ic->op == LEFT_OP || ic->op == RIGHT_OP
-
+ || (ic->op == ADDRESS_OF && isOperandOnStack (IC_LEFT (ic)))
) &&
IS_ITEMP (IC_RESULT (ic)) &&
getSize (operandType (IC_RESULT (ic))) <= 2)
setToNull ((void *) &_G.funcrUsed);
ds390_ptrRegReq = _G.stackExtend = _G.dataExtend = 0;
ds390_nRegs = 8;
-
+ if (options.model != MODEL_FLAT24) options.stack10bit = 0;
/* change assignments this will remove some
live ranges reducing some register pressure */
for (i = 0; i < count; i++)