(ic = hTabItemWithKey (iCodehTab,
bitVectFirstBit (sym->defs))) &&
POINTER_GET (ic) &&
+ !sym->noSpilLoc &&
!IS_BITVAR (sym->etype))
{
we cannot */
for (dic = ic->prev; dic; dic = dic->prev)
{
-#if 0 // jwk 20010410, the JanVanBelle case
- /* 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) &&
- (OP_SYMBOL (IC_RESULT (ic))->_isparm &&
- !OP_SYMBOL (IC_RESULT (ic))->ismyparm))
- {
- 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;
bitVectFirstBit (OP_DEFS (op)))))
return NULL;
+ /* if that only usage is a cast */
+ if (dic->op == CAST) {
+ /* to a bigger type */
+ if (getSize(OP_SYM_TYPE(IC_RESULT(dic))) >
+ getSize(OP_SYM_TYPE(IC_RIGHT(dic)))) {
+ /* than we can not, since we cannot predict the usage of b & acc */
+ return NULL;
+ }
+ }
+
/* found the definition now check if it is local */
if (dic->seq < ebp->fSeq ||
dic->seq > ebp->lSeq)
IC_LEFT (uic)->key != IC_RESULT (ic)->key)
return;
+#if 0
+ // this is too dangerous and need further restrictions
+ // see bug #447547
+
/* if one of them is a literal then we can */
if ((IC_LEFT (uic) && IS_OP_LITERAL (IC_LEFT (uic))) ||
(IC_RIGHT (uic) && IS_OP_LITERAL (IC_RIGHT (uic))))
OP_SYMBOL (IC_RESULT (ic))->accuse = 1;
return;
}
+#endif
/* if the other one is not on stack then we can */
if (IC_LEFT (uic)->key == IC_RESULT (ic)->key &&
/* make sure the right side does not have any definitions
inbetween */
dbv = OP_DEFS(IC_RIGHT(dic));
- for (lic = ic; lic != dic ; lic = lic->prev) {
+ for (lic = ic; lic && lic != dic ; lic = lic->prev) {
if (bitVectBitValue(dbv,lic->key)) return ;
}
/* make sure they have the same type */
sym_link *ditype=operandType(IC_RIGHT(dic));
if (SPEC_USIGN(itype)!=SPEC_USIGN(ditype) ||
- SPEC_SHORT(itype)!=SPEC_SHORT(ditype) ||
SPEC_LONG(itype)!=SPEC_LONG(ditype))
return;
}
/* if the type from and type to are the same
then if this is the only use then packit */
- if (checkType (operandType (IC_RIGHT (ic)),
+ if (compareType (operandType (IC_RIGHT (ic)),
operandType (IC_LEFT (ic))) == 1)
{
iCode *dic = packRegsForOneuse (ic, IC_RIGHT (ic), ebp);
setToNull ((void *) &_G.funcrUsed);
ds390_ptrRegReq = _G.stackExtend = _G.dataExtend = 0;
- /* if not register extentions then reduce number
- of registers */
- if (options.regExtend)
- ds390_nRegs = 13;
- else
- ds390_nRegs = 8;
+ ds390_nRegs = 8;
/* change assignments this will remove some
live ranges reducing some register pressure */