new_high = (v_new >> 8) & 0xff;
old_low = (v_old >> 0) & 0xff;
old_high = (v_old >> 8) & 0xff;
-
+
/* Change lower byte only. */
if(new_high == old_high)
{
emit2 ("ld a, b");
emit2 ("pop bc");
}
-
+
}
emit2 ("adc a,%s", aopGet (AOP (IC_RIGHT (ic)), 1, FALSE));
aopPut (AOP (IC_RESULT (ic)), "a", 1);
if (offset == 0)
{
if(size == 0 && AOP_TYPE (IC_RIGHT (ic)) == AOP_LIT && ulFromVal (AOP (IC_RIGHT (ic))->aopu.aop_lit) == 1)
- emit2 ("inc a");
+ emit2 ("inc a");
else
emit2 ("add a,%s", aopGet (AOP (IC_RIGHT (ic)), offset, FALSE));
}
/* For the flags */
emit2 ("or a,a");
}
+ if (size || ifx) /* emit jmp only, if it is actually used */
emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
}
offset++;
bytelit = (lit >> (offset * 8)) & 0x0FFL;
_moveA (aopGet (AOP (left), offset, FALSE));
- /* OR with any literal is the same as OR with itself. */
- emit2 ("or a,a");
- emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
+
+ if (bytelit != 0)
+ { /* FIXME, allways true, shortcut possible */
+ emit2 ("or a,%s", aopGet (AOP (right), offset, FALSE));
+ }
+ else
+ {
+ /* For the flags */
+ emit2 ("or a,a");
+ }
+
+ if (ifx) /* emit jmp only, if it is actually used */
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
offset++;
}
{
fetchPair (dest[i], AOP (pparams[i]));
continue;
- }
+ }
}
}
}