From f7ef003ee605816776f9984ea4109ad3d8f94b5f Mon Sep 17 00:00:00 2001 From: epetrich Date: Sun, 10 Dec 2006 16:43:49 +0000 Subject: [PATCH] * src/mcs51/ralloc.c (packRegsForAssign), * 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 | 4 ++++ src/hc08/ralloc.c | 6 ++++++ src/mcs51/ralloc.c | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1b32e960..5e544e41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-12-10 Erik Petrich + * src/mcs51/ralloc.c (packRegsForAssign), + * src/hc08/ralloc.c (packRegsForAssign): fixed bug #1605880 + 2006-12-10 Maarten Brock * device/include/malloc.h: removed init_dynamic_memory diff --git a/src/hc08/ralloc.c b/src/hc08/ralloc.c index 11680433..3cba4a60 100644 --- a/src/hc08/ralloc.c +++ b/src/hc08/ralloc.c @@ -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; diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 832a203c..e1ea0943 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -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; -- 2.30.2