From: frief Date: Sun, 9 Mar 2003 12:16:22 +0000 (+0000) Subject: applied inc/dec patch for variables in data space. Mentioned on sdcc-devel 2003-03-01 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=7a2d58f44908f85e62cbd7f734f443cf7dcb0ab9;p=fw%2Fsdcc applied inc/dec patch for variables in data space. Mentioned on sdcc-devel 2003-03-01 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2351 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 9ef6d91e..98b09584 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -2872,8 +2872,8 @@ genPlusIncr (iCode * ic) D(emitcode ("; genPlusIncr","")); - /* if increment 16 bits in register */ - if (AOP_TYPE(IC_LEFT(ic)) == AOP_REG && + /* if increment >=16 bits in register or direct space */ + if ((AOP_TYPE(IC_LEFT(ic)) == AOP_REG || AOP_TYPE(IC_LEFT(ic)) == AOP_DIR ) && sameRegs (AOP (IC_LEFT (ic)), AOP (IC_RESULT (ic))) && (size > 1) && (icount == 1)) @@ -3232,8 +3232,8 @@ genMinusDec (iCode * ic) D(emitcode ("; genMinusDec","")); - /* if decrement 16 bits in register */ - if (AOP_TYPE(IC_LEFT(ic)) == AOP_REG && + /* if decrement >=16 bits in register or direct space */ + if ((AOP_TYPE(IC_LEFT(ic)) == AOP_REG || AOP_TYPE(IC_LEFT(ic)) == AOP_DIR) && sameRegs (AOP (IC_LEFT (ic)), AOP (IC_RESULT (ic))) && (size > 1) && (icount == 1))