cleaned up the mess I left behind
[fw/sdcc] / src / mcs51 / gen.c
index 9ef6d91e3260afe23fd61e5ade03c3d792593367..638ad61b894cb75cc840cdc961b8f3e3cbd4b0e4 100644 (file)
@@ -2417,7 +2417,7 @@ genFunction (iCode * ic)
                     }
                }
            }
-           // jwk: this needs a closer look
+           // TODO: this needs a closer look
            SPEC_ISR_SAVED_BANKS(currFunc->etype) = banksToSave;
        }
     }
@@ -2642,7 +2642,6 @@ genEndFunction (iCode * ic)
             * Restore any register banks saved by genFunction
             * in reverse order.
             */
-         // jwk: this needs a closer look
            unsigned savedBanks = SPEC_ISR_SAVED_BANKS(currFunc->etype);
            int ix;
          
@@ -2872,8 +2871,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 +3231,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))