b) has a spill location */
if (sym->isspilt || sym->nRegs == 0) {
+ asmop *oldAsmOp = NULL;
+
/* rematerialize it NOW */
if (sym->remat) {
sym->aop = op->aop = aop = aopForRemat (sym);
/* else spill location */
if (sym->usl.spillLoc && 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;
}
(int) floatFromVal (AOP (right)->aopu.
aop_lit);
int p2 = powof2 (lit);
- if (bitop == AVR_AND && p2) { /* right side is a power of 2 */
+ if (bitop == AVR_AND && (p2 >= 0)) { /* right side is a power of 2 */
l = aopGet (AOP (left), p2 / 8);
if (IC_TRUE (ifx)) {
emitcode ("sbrc", "%s,%d", l,