From 294f092ae60c46c577daf20ae05c1e6db7fa806c Mon Sep 17 00:00:00 2001 From: sandeep Date: Tue, 18 Dec 2001 04:18:45 +0000 Subject: [PATCH] added functions flat24bitModeAndPortDS390 & portIsDS390 used by ds390 peephole optimizer git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1697 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCpeeph.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/SDCCpeeph.c b/src/SDCCpeeph.c index 8797ce6c..e1c68e8b 100644 --- a/src/SDCCpeeph.c +++ b/src/SDCCpeeph.c @@ -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; -- 2.30.2