]> git.gag.com Git - fw/sdcc/commitdiff
Fixed a volatile optimalisation and some other small things
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 17 Mar 2001 15:17:56 +0000 (15:17 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 17 Mar 2001 15:17:56 +0000 (15:17 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@689 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/gen.c
src/mcs51/gen.c
src/mcs51/ralloc.c

index 50c1819e653c2082301ca35f841cb895902e050e..95361f0f24ece74f72064945e08b20d89add441e 100644 (file)
@@ -1,5 +1,5 @@
 /*-------------------------------------------------------------------------
-  gen.c - source file for code generation for 8051
+  gen.c - source file for code generation for DS80C390
 
   Written By -  Sandeep Dutta . sandeep.dutta@usa.net (1998)
          and -  Jean-Louis VERN.jlvern@writeme.com (1999)
   In other words, you are welcome to use, share and improve this program.
   You are forbidden to forbid anyone else to use, share and improve
   what you give them.   Help stamp out software-hoarding!
-
-  Notes:
-  000123 mlh  Moved aopLiteral to SDCCglue.c to help the split
-      Made everything static
 -------------------------------------------------------------------------*/
 
 #include <stdio.h>
 #endif
 
 char *aopLiteral (value * val, int offset);
-#if 0
-//REMOVE ME!!!
-extern int allocInfo;
-#endif
 
 /* this is the down and dirty file with all kinds of
    kludgy & hacky stuff. This is what it is all about
@@ -1274,7 +1266,6 @@ aopPut (asmop * aop, char *s, int offset)
 static void
 reAdjustPreg (asmop * aop)
 {
-  emitcode (";jwk","reAdjustPreg: %d", aop->coff);
   if ((aop->coff==0) || (aop->size <= 1)) {
     return;
   }
index fe0fd2b0ec9b5c2b71470c11bb22e0526773e3fc..dfdca6f5e787bac732941964f450f0b9209eff1f 100644 (file)
@@ -1112,17 +1112,15 @@ pointToEnd (asmop * aop)
 static void
 reAdjustPreg (asmop * aop)
 {
-  int size;
-
   aop->coff = 0;
-  if ((size = aop->size) <= 1)
+  if ((aop->coff==0) || aop->size <= 1)
     return;
-  size--;
+
   switch (aop->type)
     {
     case AOP_R0:
     case AOP_R1:
-      while (size--)
+      while (aop->coff--)
        emitcode ("dec", "%s", aop->aopu.aop_ptr->name);
       break;
     case AOP_DPTR:
@@ -1131,7 +1129,7 @@ reAdjustPreg (asmop * aop)
        {
          genSetDPTR (1);
        }
-      while (size--)
+      while (aop->coff--)
        {
          emitcode ("lcall", "__decdptr");
        }
index 7c0c82b37a28da9128186986b7564f3ab1f75266..30309b8bb81137cdf96c7ce4bbc08e302824755d 100644 (file)
@@ -2508,7 +2508,7 @@ mcs51_assignRegisters (eBBlock ** ebbs, int count)
   if (options.dump_rassgn)
     {
       dumpEbbsToFileExt (".dumprassgn", ebbs, count);
-      dumpLiveRanges (".lrange", liveRanges);
+      dumpLiveRanges (".dumplrange", liveRanges);
     }
 
   /* do the overlaysegment stuff SDCCmem.c */