* src/mcs51/ralloc.c (packRegsForAssign),
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 10 Dec 2006 16:43:49 +0000 (16:43 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 10 Dec 2006 16:43:49 +0000 (16:43 +0000)
* src/hc08/ralloc.c (packRegsForAssign): fixed bug #1605880

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4510 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/hc08/ralloc.c
src/mcs51/ralloc.c

index 1b32e960c31119ce9e70adabf19d6be840733fe2..5e544e4170ba640dfafb903275de15aaf564704d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+       * src/mcs51/ralloc.c (packRegsForAssign),
+       * src/hc08/ralloc.c (packRegsForAssign): fixed bug #1605880
+
 2006-12-10 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * device/include/malloc.h: removed init_dynamic_memory
index 116804335972d319f21ff542f0d2217db85349ef..3cba4a6048233d406e66b91aebb920f4a9b34af6 100644 (file)
@@ -1988,6 +1988,12 @@ packRegsForAssign (iCode * ic, eBBlock * ebp)
          break;
        }
 #endif
+      /* Don't move an assignment out of a critical block */
+      if (dic->op == CRITICAL)
+       {
+         dic = NULL;
+         break;
+       }
 
       if (SKIP_IC2 (dic))
        continue;
index 832a203cbdc9205fd41f6756a84d2e4e43964832..e1ea0943438b240ec7738c52d6e427a3c77a6110 100644 (file)
@@ -2110,6 +2110,13 @@ packRegsForAssign (iCode * ic, eBBlock * ebp)
             }
         }
 
+      /* Don't move an assignment out of a critical block */
+      if (dic->op == CRITICAL)
+       {
+         dic = NULL;
+         break;
+       }
+
       if (SKIP_IC2 (dic))
         continue;