tookout optimizeCompare from the header (has no external references)
[fw/sdcc] / src / SDCCpeeph.c
index ada11ff9e4a431c3adda955b18b16f6d431af2cf..e1c68e8be00669c8b295b75e10d4b3694a20e824 100644 (file)
@@ -89,6 +89,23 @@ pcDistance (lineNode * cpos, char *lbl, bool back)
   return 0;
 }
 
+/*-----------------------------------------------------------------*/
+/* flat24bitModeAndPortDS390 -                                            */
+/*-----------------------------------------------------------------*/
+FBYNAME (flat24bitModeAndPortDS390)
+{
+    return ((strcmp(port->target,"ds390") == 0) && 
+           (options.model == MODEL_FLAT24));
+}
+
+/*-----------------------------------------------------------------*/
+/* portIsDS390 - return true if port is DS390                             */
+/*-----------------------------------------------------------------*/
+FBYNAME (portIsDS390)
+{
+    return (strcmp(port->target,"ds390") == 0);
+}
+
 /*-----------------------------------------------------------------*/
 /* flat24bitMode - will check to see if we are in flat24 mode      */
 /*-----------------------------------------------------------------*/
@@ -253,6 +270,12 @@ callFuncByName (char *fname,
       "labelRefCount", labelRefCount
     }
     ,
+    {
+      "portIsDS390", portIsDS390
+    },
+    {
+      "24bitModeAndPortDS390", flat24bitModeAndPortDS390
+    }
   };
   int i;
 
@@ -748,6 +771,7 @@ replaceRule (lineNode ** shead, lineNode * stail, peepRule * pr)
       lbp = lb;
 
       l = pl->line;
+
       while (*l)
        {
          /* if the line contains a variable */
@@ -982,8 +1006,6 @@ peepHole (lineNode ** pls)
       /* for all rules */
       for (pr = rootRules; pr; pr = pr->next)
         {
-          fflush(stdout);
-          
           for (spl = *pls; spl; spl = spl->next)
             {
               /* if inline assembler then no peep hole */
@@ -991,7 +1013,7 @@ peepHole (lineNode ** pls)
                 continue;
               
               mtail = NULL;
-              
+
               /* Tidy up any data stored in the hTab */
               
               /* if it matches */