if (sym->usl.spillLoc)
{
+ asmop *oldAsmOp = NULL;
+
if (getSize(sym->type) != getSize(sym->usl.spillLoc->type))
{
/* force a new aop if sizes differ */
+ oldAsmOp = sym->usl.spillLoc->aop;
sym->usl.spillLoc->aop = NULL;
}
sym->aop = op->aop = aop =
aopForSym (ic, sym->usl.spillLoc, result);
+ if (getSize(sym->type) != getSize(sym->usl.spillLoc->type))
+ {
+ /* Don't reuse the new aop, go with the last one */
+ sym->usl.spillLoc->aop = oldAsmOp;
+ }
aop->size = getSize (sym->type);
return;
}
while (size--)
{
- if (pi)
- {
- emitcode ("clr", "a");
- emitcode ("movc", "a,@a+dptr");
- if (!ifx)
- aopPut (result, "a", offset++, isOperandVolatile (result, FALSE));
- emitcode ("inc", "dptr");
- }
- else
- {
- emitcode ("mov", "a,#0x%02x", offset);
- emitcode ("movc", "a,@a+dptr");
- if (!ifx)
- aopPut (result, "a", offset++, isOperandVolatile (result, FALSE));
- }
+ emitcode ("clr", "a");
+ emitcode ("movc", "a,@a+dptr");
+ if (!ifx)
+ aopPut (result, "a", offset++, isOperandVolatile (result, FALSE));
+ if (size || pi)
+ emitcode ("inc", "dptr");
}
}