IS_ITEMP (IC_RESULT (cdp->diCode)))
*opp = IC_RESULT (cdp->diCode);
- if ((*opp)&&(SPEC_USIGN(operandType (cop))==SPEC_USIGN(operandType (*opp))))
+ if ((*opp) &&
+ (SPEC_USIGN(operandType (cop))==SPEC_USIGN(operandType (*opp))) &&
+ (SPEC_SHORT(operandType (cop))==SPEC_SHORT(operandType (*opp))) &&
+ (SPEC_LONG(operandType (cop))==SPEC_LONG(operandType (*opp))))
{
if ((isGlobalInNearSpace (cop) &&
operand *geniCodeArray2Ptr (operand *);
operand *geniCodeRValue (operand *, bool);
operand *geniCodeDerefPtr (operand *,int);
+int isLvaluereq(int lvl);
#define PRINTFUNC(x) void x (FILE *of, iCode *ic, char *s)
/* forward definition of ic print functions */
operandOperation (operand * left, operand * right,
int op, sym_link * type)
{
- sym_link *let , *ret;
+ sym_link *let , *ret=NULL;
operand *retval = (operand *) 0;
assert (isOperandLiteral (left));
if (IS_LITERAL (retype) &&
!IS_FLOAT (letype) &&
(p2 = powof2 ((unsigned long)
- floatFromVal (right->operand.valOperand))))
- ic = newiCode (RIGHT_OP, left, operandFromLit (p2)); /* right shift */
+ floatFromVal (right->operand.valOperand)))) {
+ ic = newiCode (RIGHT_OP, left, operandFromLit (p2)); /* right shift */
+ }
else
{
ic = newiCode ('/', left, right); /* normal division */
for (lic = ic; lic != dic ; lic = lic->prev) {
if (bitVectBitValue(dbv,lic->key)) return ;
}
+ /* make sure they have the same type */
+ {
+ sym_link *itype=operandType(IC_LEFT(ic));
+ sym_link *ditype=operandType(IC_RIGHT(dic));
+
+ if (SPEC_USIGN(itype)!=SPEC_USIGN(ditype) ||
+ SPEC_SHORT(itype)!=SPEC_SHORT(ditype) ||
+ SPEC_USIGN(itype)!=SPEC_USIGN(ditype))
+ return;
+ }
/* extend the live range of replaced operand if needed */
if (OP_SYMBOL(IC_RIGHT(dic))->liveTo < ic->seq) {
OP_SYMBOL(IC_RIGHT(dic))->liveTo = ic->seq;
/*-----------------------------------------------------------------*/
/* packForPush - hueristics to reduce iCode for pushing */
/*-----------------------------------------------------------------*/
+catchMe() {}
+
static void
packForPush (iCode * ic, eBBlock * ebp)
{
if (bitVectBitValue(dbv,lic->key))
return ;
}
+ /* make sure they have the same type */
+ {
+ sym_link *itype=operandType(IC_LEFT(ic));
+ sym_link *ditype=operandType(IC_RIGHT(dic));
+
+ if (SPEC_USIGN(itype)!=SPEC_USIGN(ditype) ||
+ SPEC_SHORT(itype)!=SPEC_SHORT(ditype) ||
+ SPEC_USIGN(itype)!=SPEC_USIGN(ditype))
+ return;
+ }
/* extend the live range of replaced operand if needed */
if (OP_SYMBOL(IC_RIGHT(dic))->liveTo < ic->seq) {
OP_SYMBOL(IC_RIGHT(dic))->liveTo = ic->seq;