* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / src / SDCCpeeph.h
index 23b4a45196dd178b010da7387fa7ce5a4745c7fa..0c1b2f85ed2ae75e5f25267a376db5156c9fbdfb 100644 (file)
 
 #define MAX_PATTERN_LEN 128
 
+struct asmLineNode;    /* defined in each port */
+struct lineNode;
+
 typedef struct lineNode
-{
-    char *line ;
+  {
+    char *line;
+    iCode *ic;
     unsigned int isInline:1;
     unsigned int isComment:1;
     unsigned int isDebug:1;
+    unsigned int isLabel:1;
+    unsigned int visited:1;
+    struct asmLineNode *aln;
     struct lineNode *prev;
     struct lineNode *next;
-} lineNode;
+  }
+lineNode;
 
 typedef struct peepRule
-{
-    lineNode *match ;
-    lineNode *replace ;
-    unsigned int restart : 1;
+  {
+    lineNode *match;
+    lineNode *replace;
+    unsigned int restart:1;
     char *cond;
     hTab *vars;
     struct peepRule *next;
-} peepRule;
+  }
+peepRule;
+
+typedef struct
+  {
+    char name[SDCC_NAME_MAX + 1];
+    int refCount;
+    /* needed for deadMove: */
+    bool passedLabel;
+    int jmpToCount;
+  }
+labelHashEntry;
+
+bool isLabelDefinition (const char *line, const char **start, int *len,
+                        bool isPeepRule);
+
+extern hTab *labelHash;
+labelHashEntry *getLabelRef (const char *label, lineNode *head);
 
-void printLine (lineNode *,FILE *);
-lineNode *newLineNode (char *);
-lineNode *connectLine (lineNode *,lineNode *);
+void printLine (lineNode *, struct dbuf_s *);
+lineNode *newLineNode (const char *);
+lineNode *connectLine (lineNode *, lineNode *);
+void initPeepHole (void);
 void peepHole (lineNode **);
 
 #endif