+2008-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * src/z80/gen.c (genCmpGt, genCmpLt): fixed bug 2094505
+ * support/regression/tests/bug2094505.c: new, added
+
2008-09-07 Borut Razem <borut.razem AT siol.net>
* src/SDCCglue.c, src/SDCCast.c:
fixed throw of "excess elements" warning for char arrays
-2008-06-04 Maarten Brock <sourceforge.brock AT dse.nl>
+2008-09-07 Maarten Brock <sourceforge.brock AT dse.nl>
* as/z80/aslist.c (lstsym): changed old K&R to ANSI
* src/SDCCicode.c (geniCodeCritical): fixed bug for hc08
letype = getSpec (operandType (left));
retype = getSpec (operandType (right));
sign = !(SPEC_USIGN (letype) | SPEC_USIGN (retype));
- /* assign the amsops */
+ /* assign the asmops */
aopOp (left, ic, FALSE, FALSE);
aopOp (right, ic, FALSE, FALSE);
aopOp (result, ic, TRUE, FALSE);
+ setupToPreserveCarry (ic);
+
genCmp (right, left, result, ifx, sign);
+ _G.preserveCarry = FALSE;
freeAsmop (left, NULL, ic);
freeAsmop (right, NULL, ic);
freeAsmop (result, NULL, ic);
retype = getSpec (operandType (right));
sign = !(SPEC_USIGN (letype) | SPEC_USIGN (retype));
- /* assign the amsops */
+ /* assign the asmops */
aopOp (left, ic, FALSE, FALSE);
aopOp (right, ic, FALSE, FALSE);
aopOp (result, ic, TRUE, FALSE);
+ setupToPreserveCarry (ic);
+
genCmp (left, right, result, ifx, sign);
+ _G.preserveCarry = FALSE;
freeAsmop (left, NULL, ic);
freeAsmop (right, NULL, ic);
freeAsmop (result, NULL, ic);
else
{
/* we need to extend the sign :{ */
- const char *l = aopGet (AOP (right), AOP_SIZE (right) - 1,
- FALSE);
+ const char *l = aopGet (AOP (right), AOP_SIZE (right) - 1, FALSE);
_moveA (l);
emit2 ("rla ");
emit2 ("sbc a,a");