Hello

This patch enable to use:
#pragma exclude bits
In order to avoid having the automatic pushing of the bits "register" by 
interrupts handlers even if no code use them.

Thanks,

Philippe
Index: src/mcs51/gen.c
===================================================================
--- src/mcs51/gen.c	(révision 7100)
+++ src/mcs51/gen.c	(copie de travail)
@@ -3637,8 +3637,11 @@
       rsavebits = bitVectIntersect (bitVectCopy (mcs51_allBitregs ()), sym->regsUsed);
       if (IFFUNC_HASFCALL (sym->type) || !bitVectIsZero (rsavebits))
         {
-          emitpush ("bits");
-          BitBankUsed = 1;
+          if(!inExcludeList("bits"))
+            {
+              emitpush ("bits");
+              BitBankUsed = 1;
+            }
         }
       freeBitVect (rsavebits);
 
@@ -4246,7 +4249,10 @@
 
       rsavebits = bitVectIntersect (bitVectCopy (mcs51_allBitregs ()), sym->regsUsed);
       if (IFFUNC_HASFCALL (sym->type) || !bitVectIsZero (rsavebits))
-        emitpop ("bits");
+        {
+          if (!inExcludeList("bits"))
+            emitpop ("bits");
+        }
       freeBitVect (rsavebits);
 
       /* if debug then send end of function */
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to