* src/ds390/main.c,
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 25 May 2004 22:30:39 +0000 (22:30 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 25 May 2004 22:30:39 +0000 (22:30 +0000)
* src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
Brock for spotting this)
* src/ds390/gen.c (genEndFunction),
* src/mcs51/gen.c (genEndFunction): always save psw if function is an
interrupt handler and critical. Disable push/pop optimizations when
peephole optimizations disabled.

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

ChangeLog
src/ds390/gen.c
src/ds390/main.c
src/mcs51/gen.c
src/mcs51/main.c

index 958e2c1f445ebc8939d1a626d627547f27e2b3d3..38af63f1db6d8e219b2b76ee40029875645c4059 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/ds390/main.c,
+       * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
+       Brock for spotting this)
+       * src/ds390/gen.c (genEndFunction),
+       * src/mcs51/gen.c (genEndFunction): always save psw if function is an
+       interrupt handler and critical. Disable push/pop optimizations when
+       peephole optimizations disabled.
+
 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
 
        Updated pic16 library sources and headers.
index 0e077df19c4891b5118e7dec75a454f30cd16bfb..1f67805c700d0c8aea2909d7e5afb7b482a7ea69 100644 (file)
@@ -3453,7 +3453,7 @@ genEndFunction (iCode * ic)
       emitcode ("ret", "");
     }
 
-  if (!port->peep.getRegsRead || !port->peep.getRegsWritten)
+  if (!port->peep.getRegsRead || !port->peep.getRegsWritten || options.nopeep)
     return;
   
   /* If this was an interrupt handler using bank 0 that called another */
@@ -3499,8 +3499,8 @@ genEndFunction (iCode * ic)
       && !bitVectBitValue (regsUsed, CND_IDX))
     {
       regsUsed = bitVectUnion (regsUsed, regsUsedPrologue);
-      if (IFFUNC_ISISR (sym->type) && !FUNC_REGBANK(sym->type)
-          && !sym->stack)
+      if (IFFUNC_ISISR (sym->type) && !FUNC_REGBANK (sym->type)
+          && !sym->stack && !FUNC_ISCRITICAL (sym->type))
         bitVectUnSetBit (regsUsed, CND_IDX);
     }
   else
index 27e4f5fc6aa1ce35c12a2b74e24aecdb7fb8280c..6ffe1f231ed04619b90facd2f48e59c9ed8a4748 100644 (file)
@@ -630,9 +630,9 @@ ds390opcodedata;
 static ds390opcodedata ds390opcodeDataTable[] =
   {
     {"acall","j", "",   "",   ""},
-    {"ajmp", "j", "",   "",   ""},
     {"add",  "",  "w",  "rw", "r"},
     {"addc", "",  "rw", "rw", "r"},
+    {"ajmp", "j", "",   "",   ""},
     {"anl",  "",  "",   "rw", "r"},
     {"cjne", "j", "w",  "r",  "r"},
     {"clr",  "",  "",   "w",  ""},
index 861f4fc78377fbf3f57b66e57ad539d83154b606..3e9b341c535a354251af99b23c18895bb6842681 100644 (file)
@@ -3050,7 +3050,7 @@ genEndFunction (iCode * ic)
       emitcode ("ret", "");
     }
 
-  if (!port->peep.getRegsRead || !port->peep.getRegsWritten)
+  if (!port->peep.getRegsRead || !port->peep.getRegsWritten || options.nopeep)
     return;
   
   /* If this was an interrupt handler using bank 0 that called another */
@@ -3090,8 +3090,8 @@ genEndFunction (iCode * ic)
       && !bitVectBitValue (regsUsed, CND_IDX))
     {
       regsUsed = bitVectUnion (regsUsed, regsUsedPrologue);
-      if (IFFUNC_ISISR (sym->type) && !FUNC_REGBANK(sym->type)
-          && !sym->stack)
+      if (IFFUNC_ISISR (sym->type) && !FUNC_REGBANK (sym->type)
+          && !sym->stack && !FUNC_ISCRITICAL (sym->type))
         bitVectUnSetBit (regsUsed, CND_IDX);
     }
   else
index 8473028416c1258983ac3a130dcdffeebcae1a53..bfdd26d9bb53d81650e57355a398d3983bf95dfb 100644 (file)
@@ -483,9 +483,9 @@ mcs51opcodedata;
 static mcs51opcodedata mcs51opcodeDataTable[] =
   {
     {"acall","j", "",   "",   ""},
-    {"ajmp", "j", "",   "",   ""},
     {"add",  "",  "w",  "rw", "r"},
     {"addc", "",  "rw", "rw", "r"},
+    {"ajmp", "j", "",   "",   ""},
     {"anl",  "",  "",   "rw", "r"},
     {"cjne", "j", "w",  "r",  "r"},
     {"clr",  "",  "",   "w",  ""},