#define FBYNAME(x) int x (hTab *vars, lineNode *currPl, lineNode *head, \
const char *cmdLine)
+#if !OPT_DISABLE_PIC
+void peepRules2pCode(peepRule *);
+#endif
+
/*-----------------------------------------------------------------*/
/* pcDistance - afinds a label back ward or forward */
/*-----------------------------------------------------------------*/
/* don't indent comments & labels */
if (head->line &&
(*head->line == ';' ||
- head->line[strlen (head->line) - 1] == ':'))
+ head->line[strlen (head->line) - 1] == ':')) {
fprintf (of, "%s\n", head->line);
- else
+ } else {
+ if (head->isInline && *head->line=='#') {
+ // comment out preprocessor directives in inline asm
+ fprintf (of, ";");
+ }
fprintf (of, "\t%s\n", head->line);
+ }
head = head->next;
}
}
}
/*-----------------------------------------------------------------*/
-/* initPeepHole - initiaises the peep hole optimizer stuff */
+/* initPeepHole - initialises the peep hole optimizer stuff */
/*-----------------------------------------------------------------*/
void
initPeepHole ()
readRules (s = readFileIntoBuffer (options.peep_file));
setToNull ((void **) &s);
}
+
+
+#if !OPT_DISABLE_PIC
+ /* Convert the peep rules into pcode.
+ NOTE: this is only support in the PIC port (at the moment)
+ */
+ if (TARGET_IS_PIC) {
+ peepRules2pCode(rootRules);
+ }
+#endif
+
}