aop->aopu.aop_immd.from_cast_remat = 1;
ic = OP_SYMBOL (IC_RIGHT (ic))->rematiCode;
ptr_type = DCL_TYPE(from_type);
+ if (ptr_type == IPOINTER) {
+ // bug #481053
+ ptr_type = POINTER;
+ }
continue ;
} else break;
/* if we need assign a result value */
if ((IS_ITEMP (IC_RESULT (ic)) &&
(OP_SYMBOL (IC_RESULT (ic))->nRegs ||
+ OP_SYMBOL (IC_RESULT (ic))->accuse ||
OP_SYMBOL (IC_RESULT (ic))->spildir)) ||
IS_TRUE_SYMOP (IC_RESULT (ic)))
{
{
int size, offset = 0, pushed = 0;
+ D(emitcode (";", "genRet"));
+
/* if we have no return value then
just generate the "ret" */
if (!IC_LEFT (ic))
if (bitVectBitValue(OP_USES(op),lic->key) || (unsigned) lic->defKey == op->key) {
return NULL;
}
+ /* if GOTO or IFX */
+ if (lic->op == IFX || lic->op == GOTO) break;
lic = lic->next;
}
return NULL;
if (pi && AOP_TYPE (result) != AOP_STR && AOP_TYPE (result) != AOP_IMMD) {
aopPut (AOP(result),"dpl",0);
aopPut (AOP(result),"dph",1);
+ aopPut (AOP(result),"b",2);
pi->generated=1;
}
freeAsmop (result, NULL, ic, TRUE);
if (sym->stack)
{
emitcode ("mov", "a,_bp");
- emitcode ("add", "a,#0x%02x", ((char) sym->stack & 0xff));
+ emitcode ("add", "a,#0x%02x", ((sym->stack < 0) ?
+ ((char) (sym->stack - _G.nRegsSaved)) :
+ ((char) sym->stack)) & 0xff);
aopPut (AOP (IC_RESULT (ic)), "a", 0);
}
else