DCL_TYPE(newType->opval.lnk) = GPOINTER;
}
- if (newType)
+ if (0 && newType)
{
/* cast required; change this op to a cast. */
ast *parmCopy = resolveSymbols(copyAst(actParm));
actParm->opval.op = CAST;
actParm->left = newType;
actParm->right= parmCopy;
- decorateType(actParm);
+ decorateType(actParm);
}
return 0;
}
/* actParm->argSym = resolveFromTable(defParm)->sym ; */
+
actParm->argSym = defParm->sym;
/* make a copy and change the regparm type to the defined parm */
actParm->etype = getSpec(actParm->ftype = copyLinkChain(actParm->ftype));
/* if there is going to be a casing required then add it */
if (checkType(currFunc->type->next,RTYPE(tree)) < 0 )
{
-#ifdef DEMAND_INTEGER_PROMOTION
+#if 0 && defined DEMAND_INTEGER_PROMOTION
if (IS_INTEGRAL(currFunc->type->next))
{
pushTypeCastToLeaves(currFunc->type->next, tree->right, &(tree->right));
D(emitcode(";", "genCmpEq "););
- AOP_OP_3(ic);
+ AOP_OP_2(ic);
AOP_SET_LOCALS(ic);
#if 0
aopOp((left=IC_LEFT(ic)),ic,FALSE, FALSE);
IC_LEFT(ic) = t;
}
- if(ifx && !AOP_SIZE(result)){
+ if (ifx && /* !AOP_SIZE(result) */
+ OP_SYMBOL(result) &&
+ OP_SYMBOL(result)->regType == REG_CND)
+ {
symbol *tlbl;
/* if they are both bit variables */
if (AOP_TYPE(left) == AOP_CRY &&
}
/* mark the icode as generated */
ifx->generated = 1;
- goto release ;
+
+ freeAsmop(left,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
+ freeAsmop(right,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
+ return ;
}
/* if they are both bit variables */
emitcode("cpl","c");
emitcode("","%05d$:",(lbl->key+100));
}
+
+ freeAsmop(left,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
+ freeAsmop(right,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
+
+ aopOp(result,ic,TRUE, FALSE);
+
/* c = 1 if egal */
if (AOP_TYPE(result) == AOP_CRY && AOP_SIZE(result)){
outBitC(result);
then put the result in place */
outBitC(result);
} else {
- gencjne(left,right,newiTempLabel(NULL));
+ gencjne(left,right,newiTempLabel(NULL));
+
+ freeAsmop(left,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
+ freeAsmop(right,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
+
+ aopOp(result,ic,TRUE, FALSE);
+
if (AOP_TYPE(result) == AOP_CRY && AOP_SIZE(result)) {
aopPut(AOP(result),"a",0);
goto release ;
}
release:
- freeAsmop(left,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
- freeAsmop(right,NULL,ic,(RESULTONSTACK(ic) ? FALSE : TRUE));
freeAsmop(result,NULL,ic,TRUE);
}