added functions flat24bitModeAndPortDS390 & portIsDS390 used by ds390 peephole optimizer
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:18:45 +0000 (04:18 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:18:45 +0000 (04:18 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1697 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCpeeph.c

index 8797ce6c41301380fdb8ef2cafc979a7cdde3f5d..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;