From: frief Date: Sun, 23 Feb 2003 11:26:47 +0000 (+0000) Subject: genUminusfloat avoiding 3 pairs of X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=19e077f4cc384f6aa2534e90dfadfde2515fbcad;p=fw%2Fsdcc genUminusfloat avoiding 3 pairs of inc dprtr lcall __decdptr for xdata variables git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2293 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 1d410138..d58f60d6 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -1444,15 +1444,9 @@ genUminusFloat (operand * op, operand * result) D(emitcode ("; genUminusFloat","")); - /* for this we just need to flip the - first it then copy the rest in place */ - size = AOP_SIZE (op) - 1; - l = aopGet (AOP (op), 3, FALSE, FALSE); - - MOVA (l); + /* for this we just copy and then flip the bit */ - emitcode ("cpl", "acc.7"); - aopPut (AOP (result), "a", 3); + size = AOP_SIZE (op) - 1; while (size--) { @@ -1461,6 +1455,13 @@ genUminusFloat (operand * op, operand * result) offset); offset++; } + + l = aopGet (AOP (op), offset, FALSE, FALSE); + + MOVA (l); + + emitcode ("cpl", "acc.7"); + aopPut (AOP (result), "a", offset); } /*-----------------------------------------------------------------*/ @@ -6519,7 +6520,7 @@ genLeftShift (iCode * ic) char *l; symbol *tlbl, *tlbl1; - D(emitcode ("; genLeftShift","")); + D(emitcode ("; genLeftShift","")); right = IC_RIGHT (ic); left = IC_LEFT (ic);