X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fz80%2Fgen.c;h=0f9a24c49f9897e8376e45f14489d742f088dfac;hb=23ff63c7ce648660a0cf2f003d80fa27b4ecd86e;hp=2892942d969b68c37dd930b32cd3d02cb810525a;hpb=564d4f110eed8367e2b0ef44aae6609ad429b15a;p=fw%2Fsdcc diff --git a/src/z80/gen.c b/src/z80/gen.c index 2892942d..0f9a24c4 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -825,7 +825,7 @@ aopOp (operand * op, iCode * ic, bool result, bool requires_a) } /* if already has a asmop then continue */ - if (op->aop && aop->size == getSize(sym->type)) + if (op->aop) { return; } @@ -920,6 +920,10 @@ aopOp (operand * op, iCode * ic, bool result, bool requires_a) } /* else spill location */ + if (sym->usl.spillLoc && getSize(sym->type) != getSize(sym->usl.spillLoc->type)) { + /* force a new aop if sizes differ */ + sym->usl.spillLoc->aop = NULL; + } op->aop = aop = aopForSym (ic, sym->usl.spillLoc, result, requires_a); wassertl (aop->size >= getSize (sym->type), "Operand doesn't fit in the spill location");